SlideShare a Scribd company logo
1 of 16
RabbitMQ Introduction
Scope of this presentation
 In Scope
◦ Brief history of Rabbit MQ
◦ Brief introduction of Rabbit MQ
components
◦ Messaging Flow in Rabbit MQ
◦ Example of sending and receiving
messages to/from RabbitMQ
Data Flow
 Data is every where
 Data flows from
 Method – Method
 Class – Class
 Module – Module
 System – System
Producer
Data Consume
r
Why Messaging systems
 Loose coupling between modules
 Queuing data for later delivery
 Asynchronous processing
 Reliable load balancing
Rabbit MQ
 Rabbit Technologies started as a joint
venture between LShift and
CohesiveFT in 2007
 acquired in April 2010 by
SpringSource, a division of VMWare.
 Became part of GoPivotal in May 2013
 Client Libraries available for all major
languages
RabbitMQ Introduction
 RabbitMQ is open source Messaging
Broker software
 Message Oriented Middleware
 Server written in Erlang
 Implements AMQP
Differences between JMS and
AMQP
JMS AMQP
API Protocol
5 different data types Only supports binary Data type
2 messaging models P-P and
Publish Subscriber
4 messaging models ( Exchanges )
Producers sends messages to
Queue/Topic directly
Producers sends messages to an
exchanges
Java specific Has support for many languages
Java, Pika, Ruby
Java Client API
//Getting Channel
ConnectionFactory factory = new ConnectionFactory();
factory.setHost(“<host>");
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
// Declare the exchange
channel.exchangeDeclare(EXCHANGE_NAME, "direct");
// declare and bind the queue to exchange
String queueName = channel.queueDeclare(QUEUE_NAME,
false, false, false, null).getQueue();
channel.queueBind(queueName, EXCHANGE_NAME, "<routing
key>");
//publish message to queue
String message = "Hello World!";
channel.basicPublish("", queueName, null, message.getBytes());
Basic Flow
Binding and Routing Key
 Bindings: Each Queue should bind with
an Exchange with a routing key
 Routing key : String of characters
 Exchange Type decides strategy for
routing messages to bounded queues
◦ Direct exchange : matches routing key of
message exactly with the routing key of
queues specified at the time of binding
◦ Fanout exchange : ignores the routing key
and sends a copy of message to every
bounded queue
Exchange
 Default
◦ Direct exchange with no name
◦ Routing key equals QueueName
 Direct
◦ Messages would only be routed when there is queue
bonded with Routing Key
 Fanout
◦ Messages would be routed to all queues bounded
irrespective of routing key
 Topic
◦ We can use regular expressions for routing key
 Header
◦ Least used
◦ Matches against header properties instead of routing key
Direct Exchange
(Peer – Peer Communication with
RabbitMQ)
P
Direct
Exchange
Mechanical
Queue1
Queue2
Queue3
C
C
C
Routing Key for bounded
Queues
Routing Key of message
Fanout Exchange
(Publish Subscriber model with RabbitMQ)
P
Fanout
Exchange
Mechanical
Queue1
Queue2
Queue3
C
C
C
Topic exchange
 Regular expressions as routing key
 * means one word , # means one or more word
P
Topic
Exchang
e
Log.critical
Queue1
Queue2
Queue3
C
C
C
Alert.critical
Log.debug.da
o
Alert.critical
Log.critical Log.debug.dao
Log.critical
Log.debug.dao
Code Samples (Git
repository)
 https://github.com/ShirishkumarBari/L
earnRabbitMQ
References
 https://www.rabbitmq.com/
 https://en.wikipedia.org/wiki/RabbitMQ
 http://www.levvel.io/blog-post/rabbitmq-an
introduction/
 https://dzone.com/

More Related Content

What's hot

Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffArchitecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffJAX London
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging QueuesNaukri.com
 
RabbitMQ interview Questions and Answers
RabbitMQ interview Questions and AnswersRabbitMQ interview Questions and Answers
RabbitMQ interview Questions and Answersjeetendra mandal
 
Rabbitmq & Kafka Presentation
Rabbitmq & Kafka PresentationRabbitmq & Kafka Presentation
Rabbitmq & Kafka PresentationEmre Gündoğdu
 
Rabbitmq an amqp message broker
Rabbitmq an amqp message brokerRabbitmq an amqp message broker
Rabbitmq an amqp message brokerANASYS
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPEberhard Wolff
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQAll Things Open
 
Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservicesKunal Hire
 
19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQWoo Young Choi
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explainedconfluent
 
Kafka: All an engineer needs to know
Kafka: All an engineer needs to knowKafka: All an engineer needs to know
Kafka: All an engineer needs to knowThao Huynh Quang
 
APACHE KAFKA / Kafka Connect / Kafka Streams
APACHE KAFKA / Kafka Connect / Kafka StreamsAPACHE KAFKA / Kafka Connect / Kafka Streams
APACHE KAFKA / Kafka Connect / Kafka StreamsKetan Gote
 
Data Pipelines with Apache Kafka
Data Pipelines with Apache KafkaData Pipelines with Apache Kafka
Data Pipelines with Apache KafkaBen Stopford
 
Effective API Gateway
Effective API GatewayEffective API Gateway
Effective API GatewayHari Wiz
 
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ ClustersDavid Ware
 

What's hot (20)

Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffArchitecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
 
RabbitMQ
RabbitMQ RabbitMQ
RabbitMQ
 
RabbitMQ.ppt
RabbitMQ.pptRabbitMQ.ppt
RabbitMQ.ppt
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
RabbitMQ interview Questions and Answers
RabbitMQ interview Questions and AnswersRabbitMQ interview Questions and Answers
RabbitMQ interview Questions and Answers
 
Rabbitmq & Kafka Presentation
Rabbitmq & Kafka PresentationRabbitmq & Kafka Presentation
Rabbitmq & Kafka Presentation
 
Rabbitmq an amqp message broker
Rabbitmq an amqp message brokerRabbitmq an amqp message broker
Rabbitmq an amqp message broker
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservices
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals ExplainedApache Kafka Architecture & Fundamentals Explained
Apache Kafka Architecture & Fundamentals Explained
 
Kafka: All an engineer needs to know
Kafka: All an engineer needs to knowKafka: All an engineer needs to know
Kafka: All an engineer needs to know
 
APACHE KAFKA / Kafka Connect / Kafka Streams
APACHE KAFKA / Kafka Connect / Kafka StreamsAPACHE KAFKA / Kafka Connect / Kafka Streams
APACHE KAFKA / Kafka Connect / Kafka Streams
 
Data Pipelines with Apache Kafka
Data Pipelines with Apache KafkaData Pipelines with Apache Kafka
Data Pipelines with Apache Kafka
 
kafka
kafkakafka
kafka
 
Effective API Gateway
Effective API GatewayEffective API Gateway
Effective API Gateway
 
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ ClustersIBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
IBM MQ: Managing Workloads, Scaling and Availability with MQ Clusters
 

Similar to Rabbit MQ introduction

AMQP and RabbitMQ (OKCJUG, January 2014)
AMQP and RabbitMQ (OKCJUG, January 2014)AMQP and RabbitMQ (OKCJUG, January 2014)
AMQP and RabbitMQ (OKCJUG, January 2014)Ryan Hoegg
 
Mule with rabbit mq
Mule with rabbit mq Mule with rabbit mq
Mule with rabbit mq mdfkhan625
 
Mule with rabbitmq
Mule with rabbitmqMule with rabbitmq
Mule with rabbitmqRajkattamuri
 
Mule with rabbit mq
Mule with rabbit mq Mule with rabbit mq
Mule with rabbit mq javeed_mhd
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mqKhan625
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mqHasan Syed
 
Rabbit Mq in Mule
Rabbit Mq in MuleRabbit Mq in Mule
Rabbit Mq in MuleMohammed246
 
quickguide-einnovator-11-spring-integration
quickguide-einnovator-11-spring-integrationquickguide-einnovator-11-spring-integration
quickguide-einnovator-11-spring-integrationjorgesimao71
 
rabbitmq-230309090159-74df501353w553.pdf
rabbitmq-230309090159-74df501353w553.pdfrabbitmq-230309090159-74df501353w553.pdf
rabbitmq-230309090159-74df501353w553.pdfndonikristi98
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQPOSSCON
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfOrtus Solutions, Corp
 

Similar to Rabbit MQ introduction (20)

Rabbit mq
Rabbit mqRabbit mq
Rabbit mq
 
AMQP and RabbitMQ (OKCJUG, January 2014)
AMQP and RabbitMQ (OKCJUG, January 2014)AMQP and RabbitMQ (OKCJUG, January 2014)
AMQP and RabbitMQ (OKCJUG, January 2014)
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mq
 
Mule rabbitmq
Mule rabbitmqMule rabbitmq
Mule rabbitmq
 
Mule with rabbit mq
Mule with rabbit mq Mule with rabbit mq
Mule with rabbit mq
 
Mule with rabbitmq
Mule with rabbitmqMule with rabbitmq
Mule with rabbitmq
 
Mule with rabbit mq
Mule with rabbit mq Mule with rabbit mq
Mule with rabbit mq
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mq
 
Mule with rabbitmq
Mule with rabbitmqMule with rabbitmq
Mule with rabbitmq
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mq
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mq
 
Rabbit Mq in Mule
Rabbit Mq in MuleRabbit Mq in Mule
Rabbit Mq in Mule
 
quickguide-einnovator-11-spring-integration
quickguide-einnovator-11-spring-integrationquickguide-einnovator-11-spring-integration
quickguide-einnovator-11-spring-integration
 
Rabbit MQ
Rabbit MQRabbit MQ
Rabbit MQ
 
Rabbit mq in mule
Rabbit mq in muleRabbit mq in mule
Rabbit mq in mule
 
Mule rabbit mq
Mule rabbit mqMule rabbit mq
Mule rabbit mq
 
rabbitmq-230309090159-74df501353w553.pdf
rabbitmq-230309090159-74df501353w553.pdfrabbitmq-230309090159-74df501353w553.pdf
rabbitmq-230309090159-74df501353w553.pdf
 
Messaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQMessaging Standards and Systems - AMQP & RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
 

Recently uploaded

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 

Recently uploaded (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 

Rabbit MQ introduction

  • 2. Scope of this presentation  In Scope ◦ Brief history of Rabbit MQ ◦ Brief introduction of Rabbit MQ components ◦ Messaging Flow in Rabbit MQ ◦ Example of sending and receiving messages to/from RabbitMQ
  • 3. Data Flow  Data is every where  Data flows from  Method – Method  Class – Class  Module – Module  System – System Producer Data Consume r
  • 4. Why Messaging systems  Loose coupling between modules  Queuing data for later delivery  Asynchronous processing  Reliable load balancing
  • 5. Rabbit MQ  Rabbit Technologies started as a joint venture between LShift and CohesiveFT in 2007  acquired in April 2010 by SpringSource, a division of VMWare.  Became part of GoPivotal in May 2013  Client Libraries available for all major languages
  • 6. RabbitMQ Introduction  RabbitMQ is open source Messaging Broker software  Message Oriented Middleware  Server written in Erlang  Implements AMQP
  • 7. Differences between JMS and AMQP JMS AMQP API Protocol 5 different data types Only supports binary Data type 2 messaging models P-P and Publish Subscriber 4 messaging models ( Exchanges ) Producers sends messages to Queue/Topic directly Producers sends messages to an exchanges Java specific Has support for many languages Java, Pika, Ruby
  • 8. Java Client API //Getting Channel ConnectionFactory factory = new ConnectionFactory(); factory.setHost(“<host>"); Connection connection = factory.newConnection(); Channel channel = connection.createChannel(); // Declare the exchange channel.exchangeDeclare(EXCHANGE_NAME, "direct"); // declare and bind the queue to exchange String queueName = channel.queueDeclare(QUEUE_NAME, false, false, false, null).getQueue(); channel.queueBind(queueName, EXCHANGE_NAME, "<routing key>"); //publish message to queue String message = "Hello World!"; channel.basicPublish("", queueName, null, message.getBytes());
  • 10. Binding and Routing Key  Bindings: Each Queue should bind with an Exchange with a routing key  Routing key : String of characters  Exchange Type decides strategy for routing messages to bounded queues ◦ Direct exchange : matches routing key of message exactly with the routing key of queues specified at the time of binding ◦ Fanout exchange : ignores the routing key and sends a copy of message to every bounded queue
  • 11. Exchange  Default ◦ Direct exchange with no name ◦ Routing key equals QueueName  Direct ◦ Messages would only be routed when there is queue bonded with Routing Key  Fanout ◦ Messages would be routed to all queues bounded irrespective of routing key  Topic ◦ We can use regular expressions for routing key  Header ◦ Least used ◦ Matches against header properties instead of routing key
  • 12. Direct Exchange (Peer – Peer Communication with RabbitMQ) P Direct Exchange Mechanical Queue1 Queue2 Queue3 C C C Routing Key for bounded Queues Routing Key of message
  • 13. Fanout Exchange (Publish Subscriber model with RabbitMQ) P Fanout Exchange Mechanical Queue1 Queue2 Queue3 C C C
  • 14. Topic exchange  Regular expressions as routing key  * means one word , # means one or more word P Topic Exchang e Log.critical Queue1 Queue2 Queue3 C C C Alert.critical Log.debug.da o Alert.critical Log.critical Log.debug.dao Log.critical Log.debug.dao
  • 15. Code Samples (Git repository)  https://github.com/ShirishkumarBari/L earnRabbitMQ
  • 16. References  https://www.rabbitmq.com/  https://en.wikipedia.org/wiki/RabbitMQ  http://www.levvel.io/blog-post/rabbitmq-an introduction/  https://dzone.com/