I have solace running on docker and have used JMS API to send message to a queue (the topic named "dt’ is subscribed to queue named "que1’). The event is received through the code as
2020-05-03 20:34:30:300 [Topic dt]
Delivery Mode:
Persistent
Sender Timestamp:
2020-05-03 20:34:12:510
Priority:
4
But the conntent of message is not visible. When i send the message through java script running in Try-Me publisher the message is shown .ANy help?
Hey @harry. Are you sending a text message? I would check your JMS connection factory. It’s most likely configured to use the “XML Portion” of the payload:
This is due to some old-school legacy configuration. (there are actually 2 separate payload sections in Solace messages, FYI). Anyhow, the “Try Me!” mini app only shows data from the binary portion of the payload. Solace is aware of this and is planning to fix soon.
So, either change your connection factory to set “text-msg-xml-payload” to false OR try sending a Bytes/binary message instead with your UTF-8 String as payload. I’d recommend the 2nd option, as then you can easily interoperate with non-Solace APIs and protocols, like MQTT.
Hi @Aaron , yes i was sending a text message.
I changed that too
BytesMessage message
message=session.createBytesMessage();//(res);
message.writeUTF(res); ``
messageProducer.send(topic,message);
and it worked like a charm. Thanks for the help. But if i send a text message to an actual solace queue in production (basically publishing to topics binded to a queue) , then the broker will publish the data to consumers through REST API, ) that should not be an issue right?
Ah, interesting. You are configuring a queue and an RDP to “webhook” the messages out to a REST endpoint? Either way, no I don’t think it should be a problem. In fact, I think it should be less of a problem than having it configured the previous way.
Always best to test. I don’t know 100.000% off the top of my head.
But hey, you could also implement my 1st suggestion where you just change the JMS connection factory to say “false” for text-msg-xml-payload and both should work the same… the Try Me! mini app should see it… and the outbound RDP REST API should convert it just the same.
@harry, on top of the tips that @Aaron provided you I would like to say that we have also opened a bug against the try-me tab to to show the payload when text-msg-xml-payload is set to true.
Sure @Aaron , and thanks @marc , i am just getting started with solace, lots of things to learn and understand and hopefully you are gonna hear more from me, cheers.
Hey @harry!
Hope all is going well with your Solace learnings! I just wanted to let you, and anyone else that finds this thread, know that the latest broker release, v9.6.0.27includes support in the “Try-Me!” for messages that have text-msg-xml-payload set to true.