🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Try-Me seems to send message as byte[] array and not text
Hi,
Using the the try-me functionality of the Solace Cloud Console to publish a message. The problem is that it seems to sends the message as byte array while my consumer code expects it to be a string. I don't want to change the consumer code but rather instruct Try-Me to send message as text and receive it as is.
Is it known that I should anticipate message as bytes and not as text from Try-Me and hence need the inevitable conversion ?
While I want to avoid something like this on my Consumer side
public void handleNewMessageFromSolaceUI(byte[] json) {
handleNewMessage(new String(json));
}
Comments
-
Are you referencing the try me in the broker UI?
The "try me" tab in Solace Cloud Console allows you to set the message type to "byte" or "text" (directly above the Publish button, see screenshot below) however it looks like the broker integrated "try me" doesn't offer that option.
If you are not using solace cloud you can get hold of the "try me" code on codepen:
https://codepen.io/solacecloud/pen/bxdrbL0 -
Thanks @swenhelge ,
The problem is actually reported by one of our users. And yes they have access only to the Try-Me (the one integrated with the broker). While I from the administration side have access to both.
And for the same reason codepen is not really useful from them as the brokers can only be connected from websocket using 'solace-cloud-client' credentials.
Most likely this (enable text option on broker integrated try-me) could be raised as an enhancement with Solace Cloud as all of our users have similar access ?
0