JMS listeners provide the information needed to route Java Message Service (JMS) messages from a specific topic or queue to a JMS service rule. A JMS listener or JMS MDB listener data instance specifies which queue or topic contains the messages to be consumed and which JMS service rule(s) will process the messages.
The following tabs are available on this form:
Both JMS messaging domains are supported: publish-and-subscribe (including durable subscriptions) and point-to-point.
JMS listeners can be implemented in one of two ways:
- When your system is deployed as a Web application, the listener runs as a Java thread, created when the system starts. The listener waits for incoming messages on the JMS destination (queue or topic). At regular intervals (as specified on the listener form), the listener checks to see the system issued a request for it to stop running. If your system is deployed as a Web application, configure JMS listeners with this JMS Listener form.
- When your system is deployed as an enterprise application, the listener is a message-driven bean (MDB) deployed inside your PegaRULES application. The MDB routes messages to the JMS service rule. If your system is deployed as an enterprise application, configure your JMS listeners with the JMS MDB Listener form ( Data-Admin-Connect-JMSMDBListener ). Use the form to configure the listener and to generate a fragment of the EJB deployment descriptor file that describes the MDB. Insert the fragment into the message-driven beans subsection of the EJB deployment descriptor file. For deployment instructions, see the Pega Community article How to deploy a JMS Listener as a message-driven bean.
For more information, see the Pega Community article Using MQ and JMS services with Enterprise Application deployment.
To review or create JMS Listener data instances, use the Records Explorer.
You can create a JMS Listener data instance with the Service Wizard when creating JMS service rules.
The Data-Admin-Connect-JMSListener class holds JMS Listener data instances. They are part of the Integration-Resources category.