Learn by product

Select the product you would like help with:

Martini Logo
Select the product you would like help with:
Community Q&A

Ask the Community

I have a JMS message that is a JSON format, how do i parse it in Gloop? I want to my Gloop service to accept the JSON from JMS message being published


For Gloop services that is used as the Gloop service being triggered by JMS Listener endpoint, there are certain variables that are exposed to the configured service. These variables or properties will be used as the input properties of that service.


Depending on how you are publishing your message, or what messages you are publishing, you can check the JMS listener-specific parameters you can use in your service.


Consider the example below:



The above image is a simple Gloop service that logs the message received by this service from JMS. This service has been exposed as the listener service for a JMS Listener endpoint that is subscribed to a topic called myTopic, and was also configured to have the input texMessage.



Now let's try publishing a JSON string to myTopic. See GIF




Take note that this is just one way to handle a JMS message that contains JSON, you can check JMS listener-specific parameters in Martini documentation to learn more about the supported JMS message types.