[rabbitmq-discuss] STOMP doesn't include the routing-key on MESSAGE frames
Tony Garnock-Jones
tonygarnockjones+rabbitmq at gmail.com
Tue Feb 14 17:13:31 GMT 2012
No comments on this?
On 10 February 2012 10:56, Tony Garnock-Jones
<tonygarnockjones+rabbitmq at gmail.com> wrote:
> Hi all,
>
> Attempting to use the STOMP adapter the other day I discovered an
> oversight in the new design: the AMQP routing key is no longer
> propagated into outgoing MESSAGE frames. This stopped my application
> from working.
>
> Here's a patch (obviously crude, e.g. doesn't define a
> ?HEADER_ROUTING_KEY macro or anything) that causes the routing_key to
> be sent along:
>
> diff -r 3be0091c6401 src/rabbit_stomp_util.erl
> --- a/src/rabbit_stomp_util.erl Wed Feb 08 15:53:59 2012 +0000
> +++ b/src/rabbit_stomp_util.erl Fri Feb 10 10:53:21 2012 -0500
> @@ -78,9 +78,11 @@
>
> message_headers(Destination, SessionId,
> #'basic.deliver'{consumer_tag = ConsumerTag,
> - delivery_tag = DeliveryTag},
> + delivery_tag = DeliveryTag,
> + routing_key = RoutingKey},
> Props = #'P_basic'{headers = Headers}) ->
> Basic = [{?HEADER_DESTINATION, Destination},
> + {"amqp-routing-key", binary_to_list(RoutingKey)},
> {?HEADER_MESSAGE_ID,
> create_message_id(ConsumerTag, SessionId, DeliveryTag)}],
>
>
> I'd be very happy to see this included into the master branch of the
> STOMP adapter.
>
> Regards,
> Tony
> --
> Tony Garnock-Jones
> tonygarnockjones at gmail.com
> http://homepages.kcbbs.gen.nz/tonyg/
--
Tony Garnock-Jones
tonygarnockjones at gmail.com
http://homepages.kcbbs.gen.nz/tonyg/
More information about the rabbitmq-discuss
mailing list