Skip to main content
Question

Pass message from JMS message to workspace.

  • Feb 3, 2023 12:47 PM UTC
  • 3 replies
  • 83 views

dkirouac
Contributor
Forum|alt.badge.img+5

I have an automation that starts with a JMS Message that reads ActiveMQ. I have a workspace that processes JSONs from ActiveMQ. How do I configure the automation to pass the JSON message from ActiveMQ to the workspace so that the workspace will use the JSON as the input to process?

3 replies

fgiron
Enthusiast
Forum|alt.badge.img+25
  • Enthusiast
  • Feb 3, 2023 3:19 PM UTC

In your workspace you have to create a user parameter and use it as the input for your JSON message. Probably the most intuitive thing to do is to use a ParameterFetcher and then use your JSON transformers to parse the attribute containing the JSON. If you are using the JSON Reader it might be easier to use an AttributeFileWriter and a FeatureReader to replace your Reader.

In your automation, you will have pass the JSON from your trigger to the user parameter you've just created using the automation keys.

I hope this helps.


dkirouac
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • Feb 3, 2023 5:33 PM UTC

In your workspace you have to create a user parameter and use it as the input for your JSON message. Probably the most intuitive thing to do is to use a ParameterFetcher and then use your JSON transformers to parse the attribute containing the JSON. If you are using the JSON Reader it might be easier to use an AttributeFileWriter and a FeatureReader to replace your Reader.

In your automation, you will have pass the JSON from your trigger to the user parameter you've just created using the automation keys.

I hope this helps.

Thank you for your response. When testing in Workbench I used the JMSReceiver and the JSON was the jms_content value so I did not need a reader. I was able to use the jms_content attribute (the JSON) and then further process it. When migrating to Server I created an Automation and I added a JMS Message to listen to ActiveMQ and published my workspace as a service without the JMSReceiver. I was unsure how to pass the JMS Message "message" with the JSON to the workspace. Sounds like I need to create a parameter in the workspace and pass it to the parameter. Thanks, David


fgiron
Enthusiast
Forum|alt.badge.img+25
  • Enthusiast
  • Feb 3, 2023 5:41 PM UTC

Thank you for your response. When testing in Workbench I used the JMSReceiver and the JSON was the jms_content value so I did not need a reader. I was able to use the jms_content attribute (the JSON) and then further process it. When migrating to Server I created an Automation and I added a JMS Message to listen to ActiveMQ and published my workspace as a service without the JMSReceiver. I was unsure how to pass the JMS Message "message" with the JSON to the workspace. Sounds like I need to create a parameter in the workspace and pass it to the parameter. Thanks, David

Exactly, that's it!