UM Admin API to peek contents of a topic without subscribing

Hello,

I am trying to build a tool to peek contents of a topic in Universal Messaging 10.3. I am using runUMTool.sh to peek the payload without subscribing.

Script:
/UniversalMessaging/tools/runner/./runUMTool.sh ViewDurableEvent -rname=%realm% -channelname=%channelName% -durablename=%durableName% -startid=%startID% -displayanydata=true

Since we are using JMS to publish data to UM, we are getting the response in Byte array like mentioned bello,

Event ID: 28
Event Timestamp: 1550656406079
Event Properties:
$coderType = idata_bytes
Event Data:
[11, 4, 0, 0, 0, 1, 5, 1, 4, 25, 0, 99, 0, 111, 0, 109, 0, 46, 0, 119, 0, 109, 0, 46, 0, 100, 0, 97, 0, 116, 0, 97, 0, 46, 0, 73, 0, 83, 0, 77, 0, 101, 0, 109, 0, 68, 0, 97, 0, 116, 0, 97, 0, 73, 0, 109, 0, 112, 0, 108, 4, 4, 0, 100, 0, 97, 0, 116, 0, 97, 4, 9, 0, 119, 0, 101, 0, 100, 0, 110, 0, 101, 0, 115, 0, 100, 0, 97, 0, 121, 2, 0]

When I try to convert the above byte array to string using a custom java service, which I have attached. I am getting special character’s. It will be helpful if anyone can suggest an alternative to avoid the special character’s and get the payload.:):):slight_smile:

Please do let me know if further information is required.

You can refer the Java UM API to write java class and there are some samples present in

\UniversalMessaging\java\examples\com\softwareag\um\tools

That string of bytes is not UTF-8 encoded so you will need to use the IData tooling to decode the string into a format that you need.