2. WHO AM I?
• Luis Majano - Computer Engineer
• Born in El Salvador ------------------>
• Architecture + Software Design
• CEO of Ortus Solutions
• Manager of the IECFUG
(www.iecfug.com)
• Adobe Community Professional
• Creator of all things Box:
ColdBox, ContentBox,WireBox....
3. AGENDA
• RPC Calls
• What is Messaging
• Implementations
• AMQP Protocol
• RabbitMQ
• Nice Demo
5. • Blocks Request Usage
• Even if you do them Asynchronous, messages only 1 receiver
• Sender always knows about receiver
• Receiver knows about sender
• How can we decouple knowledge?
• How can we apply messaging patterns to our apps?
PROBLEMS WITH RPC
6. Messaging (EMS)
Producer
Consumer Consumer Consumer
Messaging Bus
Can be
any system or
language
Can be
any system or
language
Doesn’t
care about
consumers
Asynchronous
Does not get a
response
7. • Producers don’t care about consumers -> Decouple
• Cross platforms-technologies-OS, you name it -> Flexibility
• Event Driven Programming -> Scalability
• Queueing for later delivery
• Asynchronous
• Load balancing
• Hulkyfied services
BENEFITS OF MESSAGING
11. • AMQP Messaging Broker
• www.rabbitmq.com
• Built on erlang like Couchbase NoSQL
• Extremely fast, reliable and secure
• Languages: c#, erlang, java, python, ruby, node, etc
• Simple concept
• Accepts and forwards messages
• Its like a post box, post office and postman
12. HOW IT WORKS?
Producer
Message
(Body+Routing Key)
Exchange (Bindings via Routing Key)
Body = binary, json,
anything
stock.
prices
stock.
run
log.
error
cluster
Queues are bound to exchanges with patterns
Routing key =
Bindings
Queues
13. • Direct
• Routing key = queue name
• No mapping or extra fluff just a passthrough
• Similar to JMS
• Topic
• Binding pattern (routing key) is match against the queue name
• Not full regex
• Ex: log.*, log#
• Not like JMSTopics, forget JMS, this is not JMS
• Fanout + More
EXCHANGETYPES
14. LOAD BALANCING + ACK
Worker
Queue
Consumer
Consumer
Consumer
Messages are
round-robin
to each
consumer
Consumer
need to ack