[rabbitmq-discuss] Federation and Stomp

joshua__lim joshua__lim at hotmail.com
Tue Jan 14 05:08:59 GMT 2014


Hi Steve, I've been trying to get Durable Exchange to work without success,
both topic and direct exchange.  Here's my findings:

I read somewhere that says to create durable subscription for exchange, I'd
need to set the client-id header on the CONNECT and the id header to a
unique string and set persistent: true.  This doesn't appear to work at this
moment as subscribed-clients will lose messages sent to the exchange if they
are not connected.

What I've observed from the web management console is that the messages are
being sent to and buffered on the "amq.gen-random-characters-here" queue
created when the client was last connected.  Note: This
"amq.gen-random-characters-here" queue is durable.

When the consumer reconnects using the same client-id header and
re-subscribes using the same id, a new queue is generated and this queue has
no messages.

Here's what I did:

Consumer:

ncat localhost 61613
CONNECT
login:joshua
passcode:joshua
client-id:connect-03

^@
CONNECTED
session:session-a5K-Wxdgg0TzUn9Ym6bKgg
heart-beat:0,0
server:RabbitMQ/3.2.1
version:1.0

 SUBSCRIBE
destination:/exchange/topic-x/high.*
ack:client-individual
id:subscribe-03
persistent:true
receipt:001

^@
RECEIPT
receipt-id:001

 MESSAGE
subscription:subscribe-03
destination:/exchange/topic-x/high.alarm
message-id:T_subscribe-03@@session-a5K-Wxdgg0TzUn9Ym6bKgg@@1
delivery-mode:2
receipt:002
app-id:guest
persistent:true
content-length:6

test3
 ^C

Producer:

ncat localhost 61613
CONNECT
login:guest
passcode:guest
client-id:guest

^@
CONNECTED
session:session-Q1Di3bc_DBXPHPT90h55NQ
heart-beat:0,0
server:RabbitMQ/3.2.1
version:1.0

 SEND
destination:/exchange/topic-x2/high.alarm
receipt:001
persistent:true
delivery-mode:2
app-id:guest

test1
^@
RECEIPT
receipt-id:001


Finally, I've tried the Durable Topic Subscription - /topic/<name> using a
unique id in the subscribe header + persistent: true.  It appears that only
the first or first two message that is queued when the subscriber is offline
is delivered when the subscriber is back online.  So even if I sent 10-20
messages, only 1 or 2 messages is successfully delivered.

Rgds,
Joshua



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/Federation-and-Stomp-tp20052p32536.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list