[rabbitmq-discuss] STOMP perl headers-example-[recv|send].pl don't work - all messages are routed

Simon MacMullen simon at rabbitmq.com
Wed Feb 12 16:02:15 GMT 2014


On 12/02/14 06:03, Guido Brugnara wrote:
> The second message was not to be routed because X-header1='white' in
> sent is different to X-B-header1='red' in subscribe! to destination
> '/exchange/amq.headers'.
>
> Or am I that I did not understand the use of 'exchange' of type 'headers'?

Hi.

You understand the headers exchange type fine. However, this example is 
badly out of date.

STOMP says very little about broker semantics. Prior to RabbitMQ 2.2.0, 
the STOMP adapter implemented a very AMQP-ish set of semantics. This 
allowed you to use all the flexibility of AMQP over STOMP, but it was 
badly incompatible with what the other STOMP brokers (in particular 
ActiveMQ) were doing.

In RabbitMQ 2.2.0 we rewrote the STOMP adapter to use semantics that 
were much more similar to what other brokers do. Unfortunately this 
meant you could not longer bind a queue to an exchange with binding 
arguments via STOMP. This makes the headers exchange type rather less 
useful over STOMP. You can predeclare queues and bind them using AMQP or 
HTTP, and then SUBSCRIBE via STOMP, but that's obviously not ideal.

Unfortunately this example predates this change. We should probably just 
remove it.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list