Digital Experience

Topic Publish – Subscribe Using IBM Integration Designer 8.5

Introduction:

Business Process Execution Language (BPEL) is a XML-based language used to define enterprise business processes within Web services. BPEL extends the Web services interaction model and enables it to support business transactions.

BPEL can be developed to perform multiple activities such as invoking a web service, publishing a message to topic, subscribe for messages from topic, posting message into queue and consuming messages from queue. Below are the steps to publish messages to Topic and consume messages from Topic.

WebSphere Application Server Configurations:

Create Topic Space

  • Click on “Buses” under “Service Integration” section in left panel. Then click on “BPM.ProcessServer.Bus”

01_IIDPubSub

02_IIDPubSub

 

  • Click on “Destinations” under “Destination resources” section

03_IIDPubSub

  • Click on “New” and select “Topic Space”

04_IIDPubSub

  • Specify the identifier for Topic Space

05_IIDPubSub

 

  • Navigate to next pages and click on Finish and Save configuration

06_IIDPubSub

 

07_IIDPubSub

Create Topic:

  • Select “Topic” in left panel which is under “Resources->JMS”. Click on “New” button.

08_IIDPubSub

  • Enter details such as Name, JNDI, Topic name, Bus name, Topic Space, JMS Delivery mode.

09_IIDPubSub

  • Click on “Ok” and save configuration

10_IIDPubSub

Create Topic Connection Factory (Required for Publish):

  • Click on “Topic connection factories” under “Resources->JMS” in left panel. Click on “New” button.

11_IIDPubSub

  • Select “Default messaging provider” option

12_IIDPubSub

  • Specify details such as Name, JNDI, Bus Name and other relevant details

13_IIDPubSub

14_IIDPubSub

15_IIDPubSub

  • Click on Ok and Save Configuration

16_IIDPubSub

Create Activation Specifications (Required for Subscription)

  • Click on “New” button

17_IIDPubSub

  • Select the option “Default messaging provider”

18_IIDPubSub

  • Enter details such as Name, JNDI, Destination Type, Topic’s JNDI, Bus details, Subscription Durability and other necessary information.

19_IIDPubSub

20_IIDPubSub

21_IIDPubSub

  • Click on OK and Save Configuration

22_IIDPubSub

JMS Publish in BPM Assembly Diagram:

  • Create a JMS import

23_IIDPubSub

  • Specify the interface details for the JMS import

24_IIDPubSub

  • Mention details such as JMS Messaging domain, connection factory, send destination and receive destination. These details can be selected from the server instance.

25_IIDPubSub

  • Choose respective items by clicking on Select button and choose the relevant JNDI
  1. Select Connection Factory from server instance.

26_IIDPubSub

2. Select Send Destination from server instance.

27_IIDPubSub

3. Select Receive Destination from server instance.

28_IIDPubSub

 

  • Select JAAS Alias for J2C Authentication Data Entry. Click on Finish in both the popup windows. This steps will complete the creation of JMS import and this will enable the “EmployeeRequest” BPEL to publish messages into the Topic.

29_IIDPubSub

  • Publish to Topic:

In process implementation, use invoke activity to publish messages to Topic. Note the Log Entry, employee ID has been printed here. Implementation of process can be done as per business requirement.

30_IIDPubSub

 

31_IIDPubSub

 

JMS Subscribe in BPM Assembly Diagram:

  • Create a JMS Export in Assembly Diagram.

32_IIDPubSub

  • Specify JMS Messaging Domain, Activation Specification, Receive Destination, Send Destination, J2C Authentication Data Entry and click on OK

33_IIDPubSub

  • Subscribe From Topic:

In process implementation, note the Log Entry activity, employee ID of the message received from Topic has been printed. This process will keep receiving the messages from Topic as soon as messages are published to Topic by the other process. Implementation of process can be done as per business requirement.

34_IIDPubSub

Testing Publish-Subscribe using Test Client:

 

  • Using test client of the process that publishes messages to topic, employee ID has been given as 3603566 and message has been published to Topic.

35_IIDPubSub

  • Message has been published to topic and also consumed by subscriber process. Please note the System Out which were made in Log Entry of Publish and Subscribe BPELs.

36_IIDPubSub

About the Author

More from this Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Weekly Blog Digest:

Sign Up