Sending a message and recieving a response (replyto)

469 views
Skip to first unread message

messag...@gmail.com

unread,
Jul 15, 2014, 5:15:09 AM7/15/14
to stom...@googlegroups.com
Greetings!

I'm looking at demonstrating Python code talking to Activemq. One of our usages with a existing Stomp client (not Python) is to send a message and request the response is sent to a specific queue. I.e. send a request and receive some data tied to that request.

I was wondering how this pattern could be accomplished using Stompest. In our current client the 'response->replyto' field is assigned the queue that the client wants the response posted to.

If this is possible, I would be very grateful if anybody could post some example code.

All the best,
Marc


nikipore

unread,
Jul 16, 2014, 4:07:55 PM7/16/14
to stom...@googlegroups.com
The corresponding header is reply-to for ActiveMQ, cf. here. This is not a reserved STOMP protocol header, but rather an ActiveMQ convention for the header in a STOMP message which is mapped to the JMS header JMSReplyTo.  So, with stompest you simply have to set that header:

client.send('/queue/request', headers={'reply-to': '/queue/reply'})
Reply all
Reply to author
Forward
0 new messages