Try-Me seems to send message as byte[] array and not text

Abu Member Posts: 13


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));



  • swenhelge
    swenhelge Member, Employee Posts: 77 Solace Employee

    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:

  • Abu
    Abu Member Posts: 13

    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 ?

  • swenhelge
    swenhelge Member, Employee Posts: 77 Solace Employee

    @Abu - best to raise this through Solace support as an enhancement.