2. 2
Organizer
Ikram Mohamed
Integration Associate
@OneAmerica
About the organizer:
Working as Integration Associate at OneAmerica.
Indianapolis MuleSoft Meetup Leader.
15+ Years of I.T Experience which includes 5+ years of
experience in Integrations and API Technologies.
Certified MuleSoft Integration Developer and Platform Architect.
3. 3
Speakers
Jitendra Bafna
Senior Solution Architect
Capgemini
About the speaker:
Working as Senior Solution Architect at Capgemini.
Surat MuleSoft Meetup Leader and MuleSoft Ambassador.
12.5+ Years of Experience in Integrations and API
Technologies.
Certified MuleSoft Integration Architect and platform
Architect.
4. CHEERS..!!
We have prizes to give away!
3 Winners a special prize is ready
4
A SHOW OF HANDS:
New Members With Us.!!
6. JMS (Java Messaging Service) is mostly used with APIs, enabling the application to
communicate through the exchange of messages. JMS connector is capable of sending and
receiving messages to and from topics and queues.
JMS supports two models for messaging:
• Queue (point to point).
• Topic (publish-subscribe).
6
JMS (Java Messaging Server)
7. • It enables one-to-one communication. It is also called point-to-point communication.
• The sender will deliver a message to the queue and single receivers will pick the message from
the queue.
• The receiver doesn't need to listen to the queue at the time the message is sent to the queue.
7
Queue
8. • It enables one-to-many communication. It is also called publish-subscribe communication.
• The publisher will deliver the message to a topic and it will be received by all subscribers who are
actively listening to the topic.
• A subscriber will miss the published message if it is not actively listening to the topic, unless
messages are made durable.
8
Topic
9. MuleSoft provides a JMS connector to connect any JMS supported MQ (e.g. Apache ActiveMQ).
JMS Connector provides various operations, such as:
• Ack
• Consume
• On New Message
• Publish
• Publish consume
• Recover session
9
Anypoint JMS Connector
10. The MuleSoft JMS connector provides a publish-consume operation to implement a request-reply
pattern. In this pattern, the requestor publishes the message to the Queue and the consumer
subscribes to the message from the Queue and performs the processing. Once the processing is
completed, the consumer will send a response back to the queue and the requestor will subscribe to
the message from the reply queue. This is called synchronous communication.
1
0
JMS – Request Reply Pattern
11. In persistent delivery, the JMS provider has to make sure that no message is lost in the case of a
JMS provider failure or that message can be recovered easily in the case of any failures. In the case
of any failures, JMS will make sure that the message can be sent to the Dead Letter Queue.
1
1
JMS – Guaranteed Delivery/Persistent Delivery
12. Durable Topic subscription allows you to receive a message when its published to the topic, even
when the consumer is offline. Once a durable subscription is registered, each time a consumer is
available it will receive all the messages published before the connection was established.
By default, Mule's subscription to a topic is non-durable.
1
2
JMS – Durable Topic Subscriptions
13. MuleSoft supports the transaction for the three connectors that are listed below:
• Database
• VM
• JMS
The transaction will ensure the atomicity and consistency. It is very useful when you want to make
sure that the series of operation executes successfully when the transaction is committed. In case of
any failures in any of the operations, the whole transaction needs to be rolled back and all the
systems must be in the same state they were in before the transaction started.
1
3
Transaction With MuleSoft and JMS
14. Behaviour of JMS Queues and Topics on the
Clustering and Server Group
15. Clustering is a group of nodes that acts as an single unit.
In JMS connector configuration, use can configure attribute primaryNodeOnly to define whether a
message will be only picked by the primary node or any node in the cluster. By default, the
primaryNodeOnly attribute is false.
In other words:
• if primaryNodeOnly attribute is false, the clustering works in active-active mode.
• if primaryNodeOnly attribute is true, then clustering works in active-passive mode.
1
5
Use Case 1: Application Deployed on a
Cluster With a Queue Listener
(primaryNodeOnly=false)
16. When primaryNodeOnly is true, all messages will be delivered to the primary node in the cluster. If
the primary node goes down, any one of the other nodes in the cluster will become primary and the
message will be delivered to that node.
1
6
Use Case 2: Application Deployed on a
Cluster With Queue Listener
(primaryNodeOnly=true)
17. In case of the Topic listener, you need to make sure that if a message needs to be delivered to only
one node that both nodes don't process the same message. To do this, make sure that
primaryNodeOnly attribute is true on JMS connector configuration.
1
7
Use Case 3: Application Deployed on a
Cluster With Topic Listener
(primaryNodeOnly=true)
18. In case of the Topic listener, you need to make sure that if a message needs to be delivered to only
one node that both nodes don't process the same message. To do this, make sure that
primaryNodeOnly attribute is true on JMS connector configuration.
1
8
Use Case 4: Application Deployed on a
Server Group With a Topic Listener
19. In the case of a server group with a queue listener, the message will be only delivered to one of the
nodesin the server group as the queue has a property whereby its delivers one message to one
consumer, even if multiple consumers are listening to the same queue. It will send message
randomly to one of the consumer.
1
9
Use Case 5: Application Deployed on a
Server Group With a Queue Listener