Integration Server 10.3 | JMS Client Development Guide | Sending and Receiving JMS Messages | Replying to a JMS Message | How to Send a Reply Message
 
How to Send a Reply Message
The following describes the general steps you take to build a service that sends a reply message.
1. Open or create the service that will send the reply.
If a JMS trigger received the message, this might be the trigger service or a service invoked by the trigger service. If you used the pub.jms:receive service to retrieve the message from the JMS provider, you might reply to the message within the same service or in another service invoked by the same top-level service.
2. Invoke pub.jms:reply.
This service takes the reply message you created and delivers it to the destination specified in the JMSReplyTo field in the header of the request message.
3. Populate the JMS message.
If a JMS trigger received the message, populate the JMS message header, properties, and body, follow steps 5–9 in the section How to Send a JMS Message.
4. Specify the consumer and message.
If you received the message using the pub.jms:receive service, you must specify the message consumer used to receive the message and the request message. You do not need to specify this information if a JMS trigger received the message.
Name
Description
consumer
The message consumer object used to receive the request message from the JMS provider. Integration Server uses information from the consumer to create a message producer that will send the reply message.
message
A javax.jms.Message object that contains the request message. You can map the JMSMessage/body/message field in the request message to the pub.jms:reply message input parameter. The pub.jms:reply service uses the request message to determine the replyTo destination.