https://www.rabbitmq.com/install-generic-unix.html#downloads
brew install erlang
sbin/rabbitmq-server
return new AnonmousQueue()
this will create a queue with random name and this is auto deleted when server stops
rm -rf ~/.erlang.cookie
cd sbin
./rabbitmq-plugins enable rabbitmq_management
Enabling plugins on node rabbit@MBP-C02F5ASXMD6M:
rabbitmq_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@MBP-C02F5ASXMD6M...
The following plugins have been enabled:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
started 3 plugins.
./rabbitmq-server
2023-02-21 09:10:16.694076+05:30 [notice] <0.44.0> Application syslog exited with reason: stopped
2023-02-21 09:10:16.697456+05:30 [notice] <0.228.0> Logging: switching to configured handler(s); following messages may not be visible in this log output
## ## RabbitMQ 3.11.6
## ##
########## Copyright (c) 2007-2023 VMware, Inc. or its affiliates.
###### ##
########## Licensed under the MPL 2.0. Website: https://rabbitmq.com
Erlang: 25.2.3 [jit]
TLS Library: OpenSSL - OpenSSL 1.1.1t 7 Feb 2023
Release series support status: supported
Doc guides: https://rabbitmq.com/documentation.html
Support: https://rabbitmq.com/contact.html
Tutorials: https://rabbitmq.com/getstarted.html
Monitoring: https://rabbitmq.com/monitoring.html
Logs: /Users/saiashish/Downloads/rabbitmq_server-3.11.6/var/log/rabbitmq/[email protected]
/Users/saiashish/Downloads/rabbitmq_server-3.11.6/var/log/rabbitmq/rabbit@MBP-C02F5ASXMD6M_upgrade.log
<stdout>
Config file(s): (none)
Starting broker... completed with 3 plugins.
The default administrator username and password are guest and guest.
RabbitMq is a message broker , it accepts and forwards the messages
Message queues provide a means for applications to push information to the queue. The message broker simply takes the information from the sender, translates it between different messaging protocols, if needed, and delivers the message to the correct receiver.
RabbitMq uses AMQP (Advanced Message Queuing Protocol)
AMQP is an open standard wire specification for asynchronous message communication. It provides a description of how message should be constructed.
Standard RabbitMQ Message Flow
Producer will send the message to exchange, from the exchange appropriate queue will pick the message and consumer pulls it.
Exchange will responsible for routing of the message and it exactly knows what to do.
Binding will used to establish connection b/w queue & exchange.
Queue is a buffer which stores the messages.
Consumer is a user aplication which reads the message.
AMQP is made up of exchanges, queues and bindings:
1. Direct Exchange
2. Fanout Exchange
3. Topic Exchange
4. Headers Exchange
5. Default Exchange
1. Direct Exchange : Routes messages to a queue by matching a complete routing key.
docker run -d -p 5672:5672 -p 15672:15672 --name my-rabbit rabbitmq:3-management
Fanout Exchange -> Routes messages to all the queues bound to it.
Topic Exchange -> Routes messages to multiple queues by matching a routing key to a pattern.
Header Exchange -> Routes messages based on message headers.
Default Exchange -> Routes messages to a queue by matching a queue name