The JmsMessage component represents a JMS (Java Message Service) message. In addition to the message payload, this component includes metadata about the message such us priority, expiration, type of delivery and custom properties.
JmsMessage is used with the DynamicJMS component to send and receive JMS messages.
The JmsMessage component is also used on Global Automatics that are configured as JMS listeners; when a JMS message arrives, the Global's script receives an instance of JmsMessage.
externalResourceId = "example_jms_queue"
msgBody = "This is a text message"
jmsMsg as JmsMessage = JmsMessage(type : JmsMessageType.TEXT)
jmsMsg.textValue = msgBody
jmsMsg.expiration = 'now' + '5m' // expires in 5 minutes
sendMessage(DynamicJMS,
configuration : externalResourceId,
message : jmsMsg)