qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Virgilio Fornazin <virgilioforna...@gmail.com>
Subject Re: Setting RoutingKey, QPID 0.6
Date Wed, 14 Mar 2012 22:15:50 GMT
A little snippet that may helps

            void qpid_connection::send(const destination & destination,
const message_interface & message_to_send, const bool durable)
            {
                context * qpid_context = reinterpret_cast<context
*>(m_qpid_context);

                qpid::messaging::Sender & =
qpid_context->get_sender(destination);

                try
                {
                    qpid::messaging::Message message(reinterpret_cast<const
char *>(message_to_send.ptr()), message_to_send.size());

                    if (destination.type() != destination_type::broadcast)
                    {
                        message.setSubject(destination.name());
                    }

                    message.setDurable(durable);

                    sender.send(message,
qpid_context->m_send_messages_sync);
                }
                catch (std::exception & e)
                {
                    throw
qpid_operation_exception(valor::core::runtime::string_format::format("Send
operation failed: %s", e.what()));
                }
            }

On Wed, Mar 14, 2012 at 17:39, Joe Drumm <joe.drumm@gmail.com> wrote:

> Hi,
>
> We are new to QPID and using Apache QPID 0.6.  We are able to send
> messages to a queue, but we need to set a 'routing key' and can't
> figure out how to do this in 0.6.
>
> We see in and older version of QPID that you are able to do:
>
>       qpid::client::Message message;
>       message.getDeliveryProperties().setRoutingKey(routingKey);
>
> ...but the API in 0.6 seems to have changed.
>
> Does anyone have any info here?
>
> Thanks in advance
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message