The first frame you get when receiving a message is the basic.deliver
method frame.

Cast the amqp_frame_t.payload.method.decoded to an amqp_basic_deliver_t*,
then it will be in the routing_key member of that struct.  You can also get
the exchange and consumer tag that way.

-Alan

On Mon, Nov 19, 2012 at 1:53 PM, Daniel Hook <[email protected]> wrote:

> Thanks Alan.  One more thing.  How can I get the routing key of a received
> message?
>
> On Monday, November 19, 2012 12:22:19 PM UTC-5, Alan Antonuk wrote:
>
>> You want to cast the decoded void* pointer to a amqp_basic_properties_t*
>> pointer then you can access the properties.
>>
>> Note that this pointer is invalidated the next time you call
>> amqp_maybe_release_buffers, so be sure to copy anything you need out before
>> you call that function.
>>
>> -Alan
>>
>> On Mon, Nov 19, 2012 at 9:54 AM, Daniel Hook <[email protected]> wrote:
>>
>>> I can see clearly how to set the properties in amqp_basic_publish, but
>>> how does the consumer read them?  I think it relates to the void * decoded
>>> and amqp_bytes_t raw members of amqp_frame_t::properties, but I don't know
>>> how to interpret those pointers.
>>>
>>> Thanks.
>>>
>>> ______________________________**_________________
>>> rabbitmq-discuss mailing list
>>> rabbitmq...@lists.**rabbitmq.com
>>> https://lists.rabbitmq.com/**cgi-bin/mailman/listinfo/**rabbitmq-discuss<https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss>
>>>
>>>
>>
> _______________________________________________
> rabbitmq-discuss mailing list
> [email protected]
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"rabbitmq-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rabbitmq-discuss?hl=en.

Reply via email to