Mar 2nd, 2013, 03:16 PM
How to extract routing key from message in MessageListenerAdapter
This is porbably an elementary question.
How can I extract the routing key from a message when the delegate property of the MessageListenerAdapter is set to my custom POJO. Should my POJO process a Message instead of a byte in its defaultListenerMethod()?
Additionaly is the routing key that is set by a Rabbit Template when sending the message to be consumed, a message property or should an explicit message property with name ex: 'routingKey' => 'some value' be set on the message prior to publish.
Reason why I am asking this, is I need to parse the routing key(delimited string that has an id as one of its sub string) to extract the ID and pass it along from the custom POJO to another publish component downstream.
What is best way to go about this.