添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Out of the box a STOMP consumer on an ActiveMQ broker will be able to receive TextMessages, but MapMessages will arrive without content. This is because we need to specify a converter to ActiveMQ(?) which we can do in the subscription setup, in a similar way that this thread discusses sending MapMessages from the Python end. Unfortunately there is a little bit of manual handling, because the best the client library is do is deliver a string, so you’ll have to handle the deserialisation.

The following example uses JSON as the encoding. If you change the transformation to jms-map-xml you can get the encoding as XML.

There is no simple way to automatically detect the encoding, so we rely on the data travelling through a given topic or queue to be in a consistent format. Also, the JSON encoding is a little strange, but not incomprehensible.

Broker config, sender example, and python sample code is available here .