(Migrated) AMQP routing key

(This message has been automatically imported from the retired mailing list)

Hi,

does anyone know how I can get the AMQP routing key associated with a
message?

In my application a number of messages are routed to an exchange. In
turn the exchange has a binding using wildcards to send a subset of
those messages to a queue (i.e. all messages that match ’ node..gps.
are sent to the queue ’ device.gps’).

This queue is linked to a channel in Zato for processing incoming
messages. However I would like to access the original routing key in my
Zato service as it contains some extra information about the source device.

Regards

On 22/06/15 14:26, MJS wrote:

Hi there,

does anyone know how I can get the AMQP routing key associated with a
message?

_on_message is the method responsible for turning the data AMQP delivers
into messages that are given on input to services:

https://github.com/zatosource/zato/blob/master/code/zato-server/src/zato/server/connection/amqp/channel.py#L160

Unfortunately, it discards the header_frame.

As you can see, making it part of the input the services get would be
easy - care to open a ticket on GH?

This could be treated as an omission to be fixed in a patch release
because after all HTTP headers are not thrown away so why AMQP ones
would be?

thanks,