An overview of message
brokers
Agenda
• Definitions

• Messaging Systems : purpose & features
• Frameworks
• Use Cases, Demo
• Conclusion
LEARN THE DIFFERENCE

IT COULD SAVE YOUR LIFE
Message Broker
• Component of « MOM », Message Oriented Middleware
• An architectural pattern for message validation,
transformation and routing.

• Mediate communication amongst applications,
minimizing the mutual awareness that application should
have of each other, effectively implementing decoupling
 Integrate applications without enforcing a common
interface
Purpose

• Route messages to one or more of many destinations (unicast / multicast)

• Transform messages to an alternative representation (mapping)
• Perform message aggregation, decomposition/recomposition of messages
• Respond to events or errors (“triggering”)

• Provide content and topic-based message routing using the publish–
subscribe pattern.
5
Characteristics & Features
Producer
(multiple or not)

•
•
•
•
•
•
•

push

Broker

pull

Consumer
(multiple or not)

Topology (1-1, 1-N, N-N)
Compression
Timed or permanent persistence
Disconnect detection, error recovery
Acknowleding, ordering, retries
Guaranteed delivery
Combination of features : delivery + ordering : “EOID” exactly once in order

6
Common Apps
JMS Implementations

Active MQ, Jboss Messaging, Glassfish

AMQP Implementations

Rabbit MQ

Lightweight / non-standardized

ZeroMQ, Finagle, Kafka, Beanstalkd

Commercial MOMs

IBM Websphere MQ, MSMQ (Microsoft)
BEA Weblogic, SAP Netweaver

Enterprise Service Buses

Biztalk, Websphere, Oracle Service Bus

7
AMQP
•

Some key AMQP messaging protocol requirements
– Internet protocol - like HTTP, TCP –
but ASYNCHRONOUS
– Where to send messages (Routing)
– How to get there (Delivery)
– What goes in must come out (Fidelity)

- Each message is stateless
- Consumers create queues; these
buffer messages for push to consumers
- Queues are stateful, ordered, and can
be persistent, transient, private, shared.
- Exchanges are stateless routing
tables.
8
RabbitMQ
•

Implements AMQP

•

Written in Erlang, a functional language known for its ability for concurrent
processing, and backed by Mnesia, Erlang’s powerful persistence database.

•

Used by NASA’s Nebula Cloud Computing Platform, VMWare, AT&T
Interactive, Digg, BBC, Nokia and ….

9
Unibet use of Rabbit MQ

10
Unibet and RabbitMQ

11
What about SQL Server Service Broker?
SQL Server Service Broker :
- native support for messaging and queuing applications
- use the Sql Server Database Engine components to communicate between
disparate databases.
- handles the communication paths in the context of transactioned conversation.

12
Demo

13
Links
•
•
•

http://fr.slideshare.net/MaxAlexejev/modern-distributed-messaging-and-rpc
http://msdn.microsoft.com/en-us/library/ms978706.aspx : « broker » pattern
http://blog.pasker.net/2008/06/16/you-might-need-messaging-if/ : why you
might need messaging 

•

http://fr.slideshare.net/somic/introduction-to-amqp-messaging-with-rabbitmq/ :
AMQP functionnalities in detail
http://libfugu.so/blog/2013/09/24/rabbitmq-a-quick-and-dirty-introduction
http://www.rabbitmq.com/resources/RabbitMQ_usecase_StefanNorberg_Unibet
_10xScalabilityAtHalfTheCost.pdf : Rabbit MQ at Unibet, the story of Kevin and his
candy bag

•
•

•

http://www.codeproject.com/Articles/11795/Introducing-Distributed-Messagingusing-Service-Br : good description of Sql Server Service Broker

14
15
Find out more
•

On https://techblog.betclicgroup.com/
About Betclic
•
•

•

Betclic Everest Group, one of the world leaders in online gaming, has a unique
portfolio comprising various complementary international brands: Betclic, Everest
Gaming, bet-at-home.com, Expekt…
Active in 100 countries with more than 12 million customers worldwide, the Group is
committed to promoting secure and responsible gaming and is a member of several
international professional associations including the EGBA (European Gaming and
Betting Association) and the ESSA (European Sports Security Association).
Through our brands, Betclic Everest Group places expertise, technological know-how
and security at the heart of our strategy to deliver an on-line gaming offer attuned to
the passion of our players.

Mini-Training: Message Brokers

  • 1.
    An overview ofmessage brokers
  • 2.
    Agenda • Definitions • MessagingSystems : purpose & features • Frameworks • Use Cases, Demo • Conclusion
  • 3.
    LEARN THE DIFFERENCE ITCOULD SAVE YOUR LIFE
  • 4.
    Message Broker • Componentof « MOM », Message Oriented Middleware • An architectural pattern for message validation, transformation and routing. • Mediate communication amongst applications, minimizing the mutual awareness that application should have of each other, effectively implementing decoupling  Integrate applications without enforcing a common interface
  • 5.
    Purpose • Route messagesto one or more of many destinations (unicast / multicast) • Transform messages to an alternative representation (mapping) • Perform message aggregation, decomposition/recomposition of messages • Respond to events or errors (“triggering”) • Provide content and topic-based message routing using the publish– subscribe pattern. 5
  • 6.
    Characteristics & Features Producer (multipleor not) • • • • • • • push Broker pull Consumer (multiple or not) Topology (1-1, 1-N, N-N) Compression Timed or permanent persistence Disconnect detection, error recovery Acknowleding, ordering, retries Guaranteed delivery Combination of features : delivery + ordering : “EOID” exactly once in order 6
  • 7.
    Common Apps JMS Implementations ActiveMQ, Jboss Messaging, Glassfish AMQP Implementations Rabbit MQ Lightweight / non-standardized ZeroMQ, Finagle, Kafka, Beanstalkd Commercial MOMs IBM Websphere MQ, MSMQ (Microsoft) BEA Weblogic, SAP Netweaver Enterprise Service Buses Biztalk, Websphere, Oracle Service Bus 7
  • 8.
    AMQP • Some key AMQPmessaging protocol requirements – Internet protocol - like HTTP, TCP – but ASYNCHRONOUS – Where to send messages (Routing) – How to get there (Delivery) – What goes in must come out (Fidelity) - Each message is stateless - Consumers create queues; these buffer messages for push to consumers - Queues are stateful, ordered, and can be persistent, transient, private, shared. - Exchanges are stateless routing tables. 8
  • 9.
    RabbitMQ • Implements AMQP • Written inErlang, a functional language known for its ability for concurrent processing, and backed by Mnesia, Erlang’s powerful persistence database. • Used by NASA’s Nebula Cloud Computing Platform, VMWare, AT&T Interactive, Digg, BBC, Nokia and …. 9
  • 10.
    Unibet use ofRabbit MQ 10
  • 11.
  • 12.
    What about SQLServer Service Broker? SQL Server Service Broker : - native support for messaging and queuing applications - use the Sql Server Database Engine components to communicate between disparate databases. - handles the communication paths in the context of transactioned conversation. 12
  • 13.
  • 14.
    Links • • • http://fr.slideshare.net/MaxAlexejev/modern-distributed-messaging-and-rpc http://msdn.microsoft.com/en-us/library/ms978706.aspx : «broker » pattern http://blog.pasker.net/2008/06/16/you-might-need-messaging-if/ : why you might need messaging  • http://fr.slideshare.net/somic/introduction-to-amqp-messaging-with-rabbitmq/ : AMQP functionnalities in detail http://libfugu.so/blog/2013/09/24/rabbitmq-a-quick-and-dirty-introduction http://www.rabbitmq.com/resources/RabbitMQ_usecase_StefanNorberg_Unibet _10xScalabilityAtHalfTheCost.pdf : Rabbit MQ at Unibet, the story of Kevin and his candy bag • • • http://www.codeproject.com/Articles/11795/Introducing-Distributed-Messagingusing-Service-Br : good description of Sql Server Service Broker 14
  • 15.
  • 16.
    Find out more • Onhttps://techblog.betclicgroup.com/
  • 17.
    About Betclic • • • Betclic EverestGroup, one of the world leaders in online gaming, has a unique portfolio comprising various complementary international brands: Betclic, Everest Gaming, bet-at-home.com, Expekt… Active in 100 countries with more than 12 million customers worldwide, the Group is committed to promoting secure and responsible gaming and is a member of several international professional associations including the EGBA (European Gaming and Betting Association) and the ESSA (European Sports Security Association). Through our brands, Betclic Everest Group places expertise, technological know-how and security at the heart of our strategy to deliver an on-line gaming offer attuned to the passion of our players.