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
âą HulkyïŹed 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 ofïŹce 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 ïŹuff 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