0

I want to send a message to an activeMQ and receive it via MQTT.js in the frontend.

jmsTemplate.convertAndSend("topic", "Hello World!");

I am getting the message, but with a header, that I can not decode.

S�A S�)�x-opt-jms-destQ�x-opt-jms-msg-typeQ Ss�   f    
�/ID:myID@�topic://myTopic@@@@�  j��< St�e Sw�  Hello World!

Now I am trying to remove the header from my message.

This thread mentions the targetClient property, but this doesn't seam to work with a topic: Spring JMS Template - remove RFH Header information

I also found the MessageBuilder, where I should be able to set an empty header, but this MessageBuilder doesn't work with the jmsTemplate. jmsTemplate only supports the MessageCreator, which doesn't support an empty header.

How can I send a JMS Message in plain text without any header?

Thanks for any suggestions.

Chris
  • 5,109
  • 3
  • 19
  • 40
  • Found a workaround, but i'm open for suggestions: https://stackoverflow.com/questions/56291905/how-to-send-a-jms-message-to-activemq-and-decode-it-in-javascript-with-mqttjs-pr/56428319#56428319 – Chris Jun 03 '19 at 13:25

1 Answers1

0

Updating the Queue Broker to work with JMS2 fixed this issue.

Chris
  • 5,109
  • 3
  • 19
  • 40