Search code examples
pythonactivemq-classicxstreamstompjettison

How do I configure ActiveMQ with STOMP?


I'm using stomp.py as a client for ActiveMQ to talk to VeriFIX. Verifix uses JMS.

There is an API topic to send commands to and a API.RESPONSE topic to receive responses.

Only the header arrives at the stomp client, but not the actual payload.

I seem to need to configure Message transformations on order for ActiveMQ to know how to serialize messages to STOMP clients.

http://activemq.apache.org/stomp.html mentions XStream (XML) and Jettison (JSON)

How do I configure XStream or Jettison?

(EDITED) SOLUTION:

The solution is to include a 'transformation' header.

Valid values are: jms-map-json or jms-map-xml

Here is what the subscribe frame should look like.

SUBSCRIBE
ack:auto
destination:/topic/VERIFIX.API.REPLY
transformation:jms-map-json

^@

After finding this I still can't find it in the ActiveMQ documentation.

Is this documented anywhere?


Solution

  • Since you don't provide any detailed information just some general points which might help:

    Here is a walkthrough including source on how someone else solved a similar scenario...

    These are links including tutorials and source providing reference information on STOMP/XStream etc.: