SlideShare a Scribd company logo
Message Broker System
Ahmedur Rahman Shovon
Codalo
shovon.codalo@gmail.com
But I’ll actually talk about RabbitMQ
“Message broker translates a message
from the formal messaging protocol of the
sender to the formal messaging protocol of
the receiver.”
From Wikipedia, the free encyclopedia
RabbitMQ is open source message broker
software that implements the Advanced
Message Queuing Protocol (AMQP).
The principal idea is pretty simple: it
accepts and forwards messages. You can
think about it as a post office: when you
send mail to the post box you're pretty
sure that Mr. Postman will eventually
deliver the mail to your recipient. Using
this metaphor RabbitMQ is a post box, a
post office and a postman!
What can RabbitMQ do for you?
● Messaging enables software applications to connect and scale. Applications can
connect to each other. Messaging is asynchronous, decoupling applications by
separating sending and receiving data.
● Data delivery, non-blocking operations or push notifications, publish / subscribe,
asynchronous processing, or work queues.
● RabbitMQ is a messaging broker - an intermediary for messaging. It gives your
applications a common platform to send and receive messages, and your messages
a safe place to live until received.
● Reliability
● Flexible Routing
● Clustering and Federation
● Highly Available Queues
● Multi-protocol with Many Clients
● Plugin System
Feature Highlights
PRODUCER, QUEUE, CONSUMER
Remember these things please
A producer is a user application that sends messages.
A queue is a buffer that stores messages.
A consumer is a user application that receives messages.
Now let’s see messaging in action!
1 "Hello World!"
The simplest thing that does something
2 Work queues
Distributing tasks among workers
3 Publish/Subscribe
Sending messages to many consumers
at once
4 Routing
Receiving messages selectively
5 Topics
Receiving messages based on a pattern
6 RPC
Remote procedure call implementation
What should I do to play with Rabbits?
Have a Windows machine? Start installing!
● ERLANG 64 bit exe: otp_win64_19.1.exe
● MS Visual C++ redistributable 2013 64 bit
● RabbitMQ Server: rabbitmq-server-3.6.5.exe
● RabbitMQ libraries based on the language
● Python client recommended by the RabbitMQ team: Pika
● Pika Installation: pip install pika
1 “Hello World!” - The simplest thing that does something
Our "Hello world" won't be too complex ‒ let's send a message, receive it and print it
on the screen. To do so we need two programs: one that sends a message and one
that receives and prints it.
Sending message to queue Receiving message from queue
Sending message...
Producer Script
Message is sent to the
queue
Receiving message...
Consumer Script
Message is received
from the queue
2 Work queues - Distributing tasks among workers
The main idea behind Work Queues (aka: Task Queues) is to avoid doing a resource-
intensive task immediately and having to wait for it to complete. Instead we schedule
the task to be done later.
Sending message to queue Multiple consumers receiving message
Producer’s script (new_sender.py)
Producer Script is now
updated to allow run time
argument which contains
messages
Consumer’s / Worker’s script (worker.py)
Receiver Script is now
updated to allow pause to
process the queue element.
Lets think each consumer
as a worker. We ensure the
fair dispatch of queues
using prefetch_count=1.
Each “#” in message takes
2 seconds to process.
Sending messages...
● Open two cmd and run
worker.py in both prompt.
● Open another cmd and run
new_sender.py.
● The messages with lot of #
will take much time to
process in worker
Receiving messages...
First worker received and
processed messages faster
because the fifth worker takes
a lot of time to process only one
message which takes time to
process.
Real World Uses
● Fast logging solution
● Sending emails
● Sending SMSs
● Background processing (data analysis)
Want to learn more?
● Go to the official site of RabbitMQ: https://www.rabbitmq.com/
● How about Wiki? : https://en.wikipedia.org/wiki/RabbitMQ
And pass the messages… :D
Thank you.

More Related Content

What's hot

Rabbitmq an amqp message broker
Rabbitmq an amqp message brokerRabbitmq an amqp message broker
Rabbitmq an amqp message brokerANASYS
 
Rabbitmq & Kafka Presentation
Rabbitmq & Kafka PresentationRabbitmq & Kafka Presentation
Rabbitmq & Kafka PresentationEmre Gündoğdu
 
IBM MQ Online Tutorials
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online TutorialsBigClasses.com
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafkaemreakis
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data IngestionAlvaro Videla
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging QueuesNaukri.com
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPEberhard Wolff
 
RabbitMQ interview Questions and Answers
RabbitMQ interview Questions and AnswersRabbitMQ interview Questions and Answers
RabbitMQ interview Questions and Answersjeetendra mandal
 
Kafka Overview
Kafka OverviewKafka Overview
Kafka Overviewiamtodor
 
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQAn Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQRavi Yogesh
 
Westpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache KafkaWestpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache Kafkaconfluent
 
Dissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureDissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureAlvaro Videla
 

What's hot (20)

RabbitMQ
RabbitMQRabbitMQ
RabbitMQ
 
Rabbitmq an amqp message broker
Rabbitmq an amqp message brokerRabbitmq an amqp message broker
Rabbitmq an amqp message broker
 
A Closer Look at RabbitMQ
A Closer Look at RabbitMQA Closer Look at RabbitMQ
A Closer Look at RabbitMQ
 
RabbitMQ.ppt
RabbitMQ.pptRabbitMQ.ppt
RabbitMQ.ppt
 
What is RabbitMQ ?
What is RabbitMQ ?What is RabbitMQ ?
What is RabbitMQ ?
 
Rabbitmq & Kafka Presentation
Rabbitmq & Kafka PresentationRabbitmq & Kafka Presentation
Rabbitmq & Kafka Presentation
 
IBM MQ Online Tutorials
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online Tutorials
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
 
RabbitMQ & Kafka
RabbitMQ & KafkaRabbitMQ & Kafka
RabbitMQ & Kafka
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data Ingestion
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
RabbitMQ interview Questions and Answers
RabbitMQ interview Questions and AnswersRabbitMQ interview Questions and Answers
RabbitMQ interview Questions and Answers
 
Kafka Overview
Kafka OverviewKafka Overview
Kafka Overview
 
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQAn Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
 
AMQP 1.0 introduction
AMQP 1.0 introductionAMQP 1.0 introduction
AMQP 1.0 introduction
 
Westpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache KafkaWestpac Bank Tech Talk 1: Dive into Apache Kafka
Westpac Bank Tech Talk 1: Dive into Apache Kafka
 
Kafka presentation
Kafka presentationKafka presentation
Kafka presentation
 
Dissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureDissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal Architecture
 
gRPC Overview
gRPC OverviewgRPC Overview
gRPC Overview
 

Viewers also liked

Pataphysique
PataphysiquePataphysique
PataphysiqueMarseglia
 
Madame Bovary
Madame BovaryMadame Bovary
Madame BovaryMarseglia
 
BASH SPOT Work Sample.compressed
BASH SPOT Work Sample.compressedBASH SPOT Work Sample.compressed
BASH SPOT Work Sample.compressedJhana Jones
 
sujitResume (76)
sujitResume (76)sujitResume (76)
sujitResume (76)S phutane
 
Semiología de la expresión gráfica infantil. Estudio de caso.
Semiología de la expresión gráfica infantil. Estudio de caso.Semiología de la expresión gráfica infantil. Estudio de caso.
Semiología de la expresión gráfica infantil. Estudio de caso.samsuacop
 
"And bob's your uncle." - Navigating the sea of Cloud offerings to business o...
"And bob's your uncle." - Navigating the sea of Cloud offerings to business o..."And bob's your uncle." - Navigating the sea of Cloud offerings to business o...
"And bob's your uncle." - Navigating the sea of Cloud offerings to business o...Michel Drescher
 
Japan drama, novel, short stories
Japan drama, novel, short storiesJapan drama, novel, short stories
Japan drama, novel, short storiesJerine Aina Lugami
 

Viewers also liked (10)

Pataphysique
PataphysiquePataphysique
Pataphysique
 
Bajina basta6 a
Bajina basta6 aBajina basta6 a
Bajina basta6 a
 
Madame Bovary
Madame BovaryMadame Bovary
Madame Bovary
 
BASH SPOT Work Sample.compressed
BASH SPOT Work Sample.compressedBASH SPOT Work Sample.compressed
BASH SPOT Work Sample.compressed
 
sujitResume (76)
sujitResume (76)sujitResume (76)
sujitResume (76)
 
Semiología de la expresión gráfica infantil. Estudio de caso.
Semiología de la expresión gráfica infantil. Estudio de caso.Semiología de la expresión gráfica infantil. Estudio de caso.
Semiología de la expresión gráfica infantil. Estudio de caso.
 
"And bob's your uncle." - Navigating the sea of Cloud offerings to business o...
"And bob's your uncle." - Navigating the sea of Cloud offerings to business o..."And bob's your uncle." - Navigating the sea of Cloud offerings to business o...
"And bob's your uncle." - Navigating the sea of Cloud offerings to business o...
 
Mani Final Resume
Mani Final ResumeMani Final Resume
Mani Final Resume
 
Japan drama, novel, short stories
Japan drama, novel, short storiesJapan drama, novel, short stories
Japan drama, novel, short stories
 
Websockets and SockJS, Real time chatting
Websockets and SockJS, Real time chattingWebsockets and SockJS, Real time chatting
Websockets and SockJS, Real time chatting
 

Similar to Message Broker System and RabbitMQ

Do More With Message Queue
Do More With Message QueueDo More With Message Queue
Do More With Message QueueHean Hong Leong
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKXMike Willbanks
 
HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
 HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen... HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...Matt Leming
 
Leveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push NotificationsLeveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push NotificationsMike Willbanks
 
Zend Framework Push Notifications
Zend Framework Push NotificationsZend Framework Push Notifications
Zend Framework Push NotificationsMike Willbanks
 
Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPGenora Infotech
 
Mobile Push Notifications
Mobile Push NotificationsMobile Push Notifications
Mobile Push NotificationsMike Willbanks
 
#7 (Java Message Service)
#7 (Java Message Service)#7 (Java Message Service)
#7 (Java Message Service)Ghadeer AlHasan
 
Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Mike Willbanks
 
Message passing Programing and MPI.
Message passing Programing and MPI.Message passing Programing and MPI.
Message passing Programing and MPI.Munawar Hussain
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jmsSridhar Reddy
 
Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181Robert Nicholson
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQVMware Tanzu
 
Velocity Conference '13: Asynchronous messaging for performance optimization,...
Velocity Conference '13: Asynchronous messaging for performance optimization,...Velocity Conference '13: Asynchronous messaging for performance optimization,...
Velocity Conference '13: Asynchronous messaging for performance optimization,...Al Sargent
 
Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Akshata Sawant
 

Similar to Message Broker System and RabbitMQ (20)

Do More With Message Queue
Do More With Message QueueDo More With Message Queue
Do More With Message Queue
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
 
HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
 HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen... HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
HHM-3540: The IBM MQ Light API: From Developer Laptop to Enterprise Data Cen...
 
Leveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push NotificationsLeveraging Zend Framework for Sending Push Notifications
Leveraging Zend Framework for Sending Push Notifications
 
Zend Framework Push Notifications
Zend Framework Push NotificationsZend Framework Push Notifications
Zend Framework Push Notifications
 
Chat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIPChat app case study - xmpp vs SIP
Chat app case study - xmpp vs SIP
 
Art Of Message Queues
Art Of Message QueuesArt Of Message Queues
Art Of Message Queues
 
Mobile Push Notifications
Mobile Push NotificationsMobile Push Notifications
Mobile Push Notifications
 
#7 (Java Message Service)
#7 (Java Message Service)#7 (Java Message Service)
#7 (Java Message Service)
 
Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)
 
Message passing Programing and MPI.
Message passing Programing and MPI.Message passing Programing and MPI.
Message passing Programing and MPI.
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
 
Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181Introducing MQ Light - IBM Interconnect 2015 session AME4181
Introducing MQ Light - IBM Interconnect 2015 session AME4181
 
Point of preference (POP)
Point of preference (POP)Point of preference (POP)
Point of preference (POP)
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQ
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Event driven systems
Event driven systems Event driven systems
Event driven systems
 
Velocity Conference '13: Asynchronous messaging for performance optimization,...
Velocity Conference '13: Asynchronous messaging for performance optimization,...Velocity Conference '13: Asynchronous messaging for performance optimization,...
Velocity Conference '13: Asynchronous messaging for performance optimization,...
 
Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20Mumbai MuleSoft Meetup #20
Mumbai MuleSoft Meetup #20
 

Recently uploaded

Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfalexjohnson7307
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...Product School
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 

Recently uploaded (20)

Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 

Message Broker System and RabbitMQ

  • 1. Message Broker System Ahmedur Rahman Shovon Codalo shovon.codalo@gmail.com
  • 2. But I’ll actually talk about RabbitMQ
  • 3. “Message broker translates a message from the formal messaging protocol of the sender to the formal messaging protocol of the receiver.” From Wikipedia, the free encyclopedia
  • 4. RabbitMQ is open source message broker software that implements the Advanced Message Queuing Protocol (AMQP).
  • 5. The principal idea is pretty simple: it accepts and forwards messages. You can think about it as a post office: when you send mail to the post box you're pretty sure that Mr. Postman will eventually deliver the mail to your recipient. Using this metaphor RabbitMQ is a post box, a post office and a postman!
  • 6. What can RabbitMQ do for you? ● Messaging enables software applications to connect and scale. Applications can connect to each other. Messaging is asynchronous, decoupling applications by separating sending and receiving data. ● Data delivery, non-blocking operations or push notifications, publish / subscribe, asynchronous processing, or work queues. ● RabbitMQ is a messaging broker - an intermediary for messaging. It gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.
  • 7. ● Reliability ● Flexible Routing ● Clustering and Federation ● Highly Available Queues ● Multi-protocol with Many Clients ● Plugin System Feature Highlights
  • 8. PRODUCER, QUEUE, CONSUMER Remember these things please A producer is a user application that sends messages. A queue is a buffer that stores messages. A consumer is a user application that receives messages.
  • 9. Now let’s see messaging in action!
  • 10. 1 "Hello World!" The simplest thing that does something 2 Work queues Distributing tasks among workers 3 Publish/Subscribe Sending messages to many consumers at once 4 Routing Receiving messages selectively 5 Topics Receiving messages based on a pattern 6 RPC Remote procedure call implementation
  • 11. What should I do to play with Rabbits?
  • 12. Have a Windows machine? Start installing! ● ERLANG 64 bit exe: otp_win64_19.1.exe ● MS Visual C++ redistributable 2013 64 bit ● RabbitMQ Server: rabbitmq-server-3.6.5.exe ● RabbitMQ libraries based on the language ● Python client recommended by the RabbitMQ team: Pika ● Pika Installation: pip install pika
  • 13. 1 “Hello World!” - The simplest thing that does something Our "Hello world" won't be too complex ‒ let's send a message, receive it and print it on the screen. To do so we need two programs: one that sends a message and one that receives and prints it. Sending message to queue Receiving message from queue
  • 15. Receiving message... Consumer Script Message is received from the queue
  • 16. 2 Work queues - Distributing tasks among workers The main idea behind Work Queues (aka: Task Queues) is to avoid doing a resource- intensive task immediately and having to wait for it to complete. Instead we schedule the task to be done later. Sending message to queue Multiple consumers receiving message
  • 17. Producer’s script (new_sender.py) Producer Script is now updated to allow run time argument which contains messages
  • 18. Consumer’s / Worker’s script (worker.py) Receiver Script is now updated to allow pause to process the queue element. Lets think each consumer as a worker. We ensure the fair dispatch of queues using prefetch_count=1. Each “#” in message takes 2 seconds to process.
  • 19. Sending messages... ● Open two cmd and run worker.py in both prompt. ● Open another cmd and run new_sender.py. ● The messages with lot of # will take much time to process in worker
  • 20. Receiving messages... First worker received and processed messages faster because the fifth worker takes a lot of time to process only one message which takes time to process.
  • 21. Real World Uses ● Fast logging solution ● Sending emails ● Sending SMSs ● Background processing (data analysis)
  • 22. Want to learn more? ● Go to the official site of RabbitMQ: https://www.rabbitmq.com/ ● How about Wiki? : https://en.wikipedia.org/wiki/RabbitMQ
  • 23. And pass the messages… :D