Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Configuring Pega Platform as a JMS publisher

Updated on April 6, 2022

Configure Pega Platform as a message publisher client in your Java Messaging Service (JMS) model to communicate with a message destination to send messages to other JMS clients.

Before you begin: Initialize and configure JMS resources in an external system outside of Pega Platform. Integration requires this external system to communicate through JMS messages with other applications outside of Pega Platform. For more information about Java Messaging Services, see Messaging service overview.

This task involves the following steps that take place both external to and within Pega Platform:

Java Messaging Service model requisite resources and forms: publisher client
  1. Create JMS resources:

    JMS Service forms require either the JMS resource of a JDNI server (external or internal to Pega Platform), or a resource reference. Create a JMS resource by completing the following tasks:

    1. Create a JMS server.
    2. Create a JMS module.
    3. In the JMS module, create a connection factory, and add a queue or topic.

    For more information, refer to your JMS provider documentation.

    To integrate JMS with Pega Platform as a publisher client, you create a JMS destination, connection factory, server, and other JMS resources to communicate with other applications or components. JMS resources include connection factories and destinations.

    Pega Platform uses either a resource reference or a direct JNDI lookup to integrate with your JMS model. The types of JMS resources you can use to integrate your JMS model with Pega Platform depend on your environment. For environment restrictions for each type of compatible JMS resource, see Messaging service overview.

  2. Import the JAR file for your JMS provider into the run-time classpath for Pega Platform:
    1. In the header of Dev Studio, click ConfigureApplicationDistributionImport.
    2. In the Import Wizard window, select a location from which you want to import the JAR file that you downloaded from your JMS vendor.

      Refer to the repository of your JMS provider in order to download the JAR files that are required to create a publisher client. Use the Import Wizard to automatically place the most recently imported JAR files on the run-time classpath.

    3. Click Next.
    4. Confirm the details of the JAR file, and then click Next.
    5. On the Code Archive page, in the CodeSet name and the CodeSet version fields, enter the related parameters that are used by the base ruleset of your instance of Pega Platform.
      The default value is usually CodeSet used by the base ruleset.
    6. Finish the import by clicking Next.
    7. Optional: To import all the requisite JAR files for your JMS vendor into Pega Platform, repeat substeps 4b through 2e.
    8. Import the JAR file into the CodeSet by restarting your environment.
      For Pega Cloud, you request a restart of your environment in My Support Portal.
  3. To use an JNDI server instance for your JMS resource, create a JNDI server data instance by clicking the rule that references the context factory and provider URL of the JMS resource:
    1. In the header of Dev Studio,, click Create Integration-ResourcesJNDI Server.
    2. If you use an external or internal JNDI server for your JMS resource, reference the JNDI server environment information that you created in step 1 in the JNDI Server form.
    3. Restart the environment.
      For Pega Cloud, you request a restart of your environment in My Support Portal.
    4. Test connectivity on the form before continuing your JMS integration.
    5. Optional: For Pega Cloud, to create an internal JNDI server or resource reference for use with your JMS model to make it compatible with a Pega Cloud deployment, create a request that states that you need an internal JNDI server with your regional Pega Support representative by selecting New Request in My Support Portal.
      Result: The Pega Cloud services team creates an internal JNDI service reference for you to use in your instance of Pega Platform.

    For more information about the environment tab of the JNDI Server data instance form, see JNDI Server form - Completing the Environment tab.

  4. Create a Producer Model that determines the messaging characteristics of the connector as a JMS producer:
    1. In the header of Dev Studio,, click Create Integration-ResourcesJMS Producer Model.
    2. In the JMS Producer Model form, configure the JMS Producer Model.
      For more information about completing the form, including determining whether the message should remain in queue until confirmed as received, or whether the JMS model uses point-to-point or publish/subscribe messaging. see JMS Producer Model form - Completing the Model tab.
  5. Create a Connect JMS rule that references the JNDI server or resource reference:
    1. On the Service tab, in the Resource name resolution list, select the type of JMS resource that you created in steps 1 and 2.
    2. Enter the resource reference or JNDI server information in the associated fields.
    3. In the JMS Producer Model list, select the JMS Producer Model that you created in step 3.
    4. In the Request section, in the Destination name field, enter the JMS resource for the queue or topic to receive messages.
    5. In the Response section, in the Destination name field, enter the JMS resource for a temporary queue to hold response messages.

      For more information about configuring the Connect JMS rule, see Connect JMS form – Completing the Service tab.

  6. On the Request tab, in the Message data section, in the Data type list, select the primitive Java data type that you plan to send with the message:
    1. In the Map from field, select whether you mapped your message to the Clipboard, or enter a constant value to send.
    2. In the Map from key field, select a property that contains your message.

      For more information about completing the Request tab for the Connect JMS rule, see Connect JMS form – Completing the Request tab.

  7. On the Response tab, in the Data type list, select the data type you want to use as a response from your queue or topic upon receiving the message.
    1. In the Message Key field, enter the external name for the response.
    2. In the Map to and Map to key fields, enter the elements to which you want to map the response.

      For more information about completing the Response tab of the Connect JMS rule , see Connect JMS form – Completing the Response tab.

  8. Create an activity that runs the property or key that contains the message:
    1. In the header of Dev Studio, click Create TechnicalActivity.
    2. On the Steps tab, in the Label field, enter a descriptive name for the rule instance.
    3. In the Apply to field, select the class to which this activity applies.
    4. Click Create and open.
    5. On the Steps tab, in the Method list, select Property-Set.
    6. Click the Expand icon.
    7. In the Properties Name field, enter the property that you selected in the Connect JMS rule that you created in step 4.
    8. In the Properties Value field, enter the message that you want to send through JMS.
      Note: Ensure that the message corresponds to the data type selected in the Connect JMS rule.
    9. Click Add a step.
    10. In the Method list for the new step, select Connect-JMS.
    11. Click the Expand Method Parameters icon.
    12. In the Value field, select the name of the Connect JMS rule that you created in step 4.
    13. Click Save.
    14. In the Actions list, select Run.
    15. In the Run Activity window, send the message from Pega Platform by selecting Run.
Result: The message appears in your message queue or topic.
What to do next: Test JMS messaging when you integrate Pega Platform as your JMS publisher. For more information, see Testing JMS messages.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us