2. About the Presenters
๏ Miyuru Wanninayaka - miyuru@wso2.com
Miyuru is a Senior Technical Lead in the integration technologies team where he mainly
focuses on the WSO2 Enterprise Service Bus. In addition to his product development efforts,
he has provided technology consulting on customer engagements, helping to successfully
implement enterprise integration and mobile services gateway solutions
๏ Isuru Ranawaka - Isurur@wso2.com
Isuru is a Software Engineer at WSO2. Previously an intern at WSO2 in 2012, Isuru worked on
developing CEP artifact creater tool for WSO2 Developer Studio and enhancing performance
of Siddhi CEP engine. He is a graduate from the Department of Computer Science and
Engineering, University of Moratuwa. Isuru worked on developing distributed CEP as his final
year project.
3. About WSO2
๏ Global enterprise, founded in 2005 by
acknowledged leaders in XML, web
services technologies, standards and
open source
๏ Provides only open source platform-as-a-service
for private, public and hybrid cloud
deployments
๏ All WSO2 products are 100% open source
and released under the Apache License
Version 2.0.
๏ Is an Active Member of OASIS, Cloud
Security Alliance, OSGi Alliance, AMQP
Working Group, OpenID Foundation and
W3C.
๏ Driven by Innovation
๏ Launched first open source API
Management solution in 2012
๏ Launched App Factory in 2Q 2013
๏ Launched Enterprise Store and first
open source Mobile solution in 4Q 2013
5. Agenda
๏ JMS
๏ WSO2 Message Broker
๏ Configuring JMS Transport of WSO2 ESB
๏ JMS Patterns with WSO2 ESB
๏ Beyond JMS
6. *
Introducing WSO2 ESB
๏ A lightweight, high performance ESB
๏ Comprehensive REST, SOAP, WS-* support
๏ 100% compliant with all EIPs (Enterprise Integration
Patterns)
๏ Connectors (Salesforce, Twilio and many more)
๏ SAP, FIX, HL7 - Domain specific solutions
๏ Zero Code/Configuration driven
๏ Extensible and Scalable
7. Messaging with MOM
๏ Messaging enables distributed communication that is loosely
coupled
๏ Sender does not need to know about the receiver, nor does the
receiver know anything about the sender
8. What is Java Message Service
(API)
๏ Is an API that allows applications to create, send, receive, and
read messages
๏ Enables communication that is
๏ Loosely coupled
๏ Asynchronous - JMS provider can deliver messages as they
arrive, client does not have to request messages.
๏ Reliable - The JMS API ensures that a message is delivered
once and only once
11. Queue
๏ Facilitates users to store messages sent by an external party, in
an intermediate location and access them on-demand
๏ Enables users to publish messages and receive them in the order
that they are sent
๏ Natively persistent
๏ Even after shutting down the server or if a sudden crash
happens, messages still remain in the queue ready to be
delivered
12. Topic
๏ Every message is delivered to all the subscribers
๏ Non persistent unless durable subscription
13. What is WSO2 Message Broker?
๏ WSO2 MB is a message brokering system based on Java
Messaging Service (JMS).
๏ Any client that supports AMQP is able to communicate with
WSO2 Message Broker
๏ Can be used as a standalone message broker or a distributed
message brokering system.
๏ Uses Apache Cassandra as its message store and Apache
Zookeeper for distributed coordination
๏ Can put message to one MB node in the cluster and pick up the
message from another node MB
16. ESB as JMS Consumer
๏ ESB listens to a JMS queue
๏ JMS client can place a message in JMS queue
๏ ESB picks message from JMS queue and process further
๏ ESB does not need to be active/running to client to produce
messages
17. ESB as JMS Producer
๏ Client sends a message to ESB using synchronous transport like
(HTTP)
๏ ESB puts message to a JMS queue and ack to HTTT client
๏ JMS consumer ( backend ) listens to JMS queue and picks
message
๏ ESB can produce messages to backend regardless of it’s active or
not
18. ESB as both JMS Consumer and
Producer
๏ Combination of previous two patterns
๏ Both ESB and Backend can go offline without breaking message
flow
19. JMS Synchronous Invocations
๏ Client sends a message to ESB using a synchronous transport
(HTTP)
๏ ESB sends a JMS message to request queue with JMSReplyTo
header set to response queue
๏ Backend reads message from request queue and place response
to response queue (by checking JMSReplyTo header)
๏ JMS correlation ID of response = message ID of request
20. JMS Synchronous Invocations
๏ ESB picks matching response from response queue by reading
JMS message which has correct correlation ID (ESB uses a JMS
message selector to perform this)
๏ Finally response if forwarded back to client
๏ http://docs.oracle.com/cd/E19798-01/821-1841/bncer/index.
html
21. JMS Synchronous Invocations
(Quad Channel)
๏ Using synchronous JMS invocations in both client and server side
๏ Using synchronous JMS are NOT encouraged because it’s no
longer time decoupled
22. Publish Subscribe with JMS
Client ESB
Topic
๏ Subscribers subscribed to topic in JMS broker
๏ Client sends a message to ESB
๏ ESB forwards message to topic
๏ Message broker delivers message to all subscribers
Subscriber
Subscriber
Subscriber
23. Publish Subscribe Multiple ESBs
Client ESB
Topic
ESB
ESB
ESB
๏ Multiple ESB nodes subscribed to topic in JMS broker
๏ Client sends a message to ESB
๏ ESB forwards message to topic
๏ Message broker delivers message subscribed ESB nodes
24. Message Store and Processor
๏ JMS Message Store
๏ Intermediate persistent storage of messages
๏ A store works with a processor
๏ Message Processor
๏ Sampling processor
๏ Message Forwarding processor
๏ Provides store and forward messaging within the ESB
๏ Can be used to implement
๏ Guaranteed Delivery, Request Rate Matching, In Order
Delivery, and Separation of Concerns
25. Message Store and Processor
Matching Request Rates
๏ Client and Service have two different/varying rate limits for
sending and accepting messages respectively
๏ ESB does rate matching
๏ JMS message store provides Storage
26. Message Store and Processor
Guaranteed Delivery
๏ JMS message store acting as a Dead Letter Channel
27. Message Store and Processor
In-Order Delivery
(3) Send/Retry on
failure
๏ JMS message store acting as a FIFO Queue
28. Message Store and Processor
Separation of Concerns
๏ Most common use of a message store
29. Inbound Endpoint with
Upcoming WSO2 ESB 4.9.0
๏ Create JMS Listeners dynamically without changing axis2.xml and
server restart
๏ Support JMS protocol in tenants
๏ Distributed coordination
๏ Run in all/one node
30. MQTT
๏ MQTT is light weight publish/subscribe protocol
๏ Ideal for mobile devices/IoT because of small footprint
๏ Latest WSO2 ESB supports connecting to MQTT broker
๏ Upcoming WSO2 MB can act as a MQTT broker
31. Apache Kafka
๏ Distributed publish-subscribe messaging system
๏ WSO2 ESB 4.9.0 will support connecting to Apache Kafka
๏ Kafka Inbound endpoint ( consumer )
๏ Kafka Connector ( producer )