Giter Site home page Giter Site logo

spring-rabbitmq's Introduction

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

Screenshot 2023-02-21 at 12 36 18 AM

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.

Screenshot 2023-02-21 at 12 44 21 AM

docker run -d -p 5672:5672 -p 15672:15672 --name my-rabbit rabbitmq:3-management

Screenshot 2023-02-21 at 1 03 57 AM

Screenshot 2023-02-21 at 1 04 44 AM

Screenshot 2023-02-21 at 1 17 01 AM

Screenshot 2023-02-21 at 1 18 10 AM

Screenshot 2023-02-21 at 1 19 49 AM

Screenshot 2023-02-21 at 1 20 12 AM

Screenshot 2023-02-21 at 1 20 39 AM

Screenshot 2023-02-21 at 1 27 00 AM

Screenshot 2023-02-21 at 1 27 58 AM

Screenshot 2023-02-21 at 1 27 38 AM

Screenshot 2023-02-21 at 1 37 34 AM

Screenshot 2023-02-21 at 1 43 48 AM

Screenshot 2023-02-21 at 1 44 08 AM

Screenshot 2023-02-21 at 1 44 24 AM

Screenshot 2023-02-21 at 1 44 46 AM

Screenshot 2023-02-21 at 1 45 01 AM

Screenshot 2023-02-21 at 1 45 32 AM

Screenshot 2023-02-21 at 1 45 45 AM

Fanout Exchange -> Routes messages to all the queues bound to it.

Screenshot 2023-02-21 at 1 42 29 AM

Screenshot 2023-02-21 at 1 48 54 AM

Screenshot 2023-02-21 at 1 50 02 AM

Screenshot 2023-02-21 at 1 59 22 AM

Screenshot 2023-02-21 at 1 54 11 AM

Topic Exchange -> Routes messages to multiple queues by matching a routing key to a pattern.

Screenshot 2023-02-21 at 2 10 06 AM

Screenshot 2023-02-21 at 2 28 02 AM

Screenshot 2023-02-21 at 2 28 47 AM

Screenshot 2023-02-21 at 2 29 21 AM

Screenshot 2023-02-21 at 2 29 45 AM

Screenshot 2023-02-21 at 2 30 17 AM

Header Exchange -> Routes messages based on message headers.

Screenshot 2023-02-21 at 2 23 12 AM

Screenshot 2023-02-21 at 2 42 46 AM

Screenshot 2023-02-21 at 2 43 48 AM

Screenshot 2023-02-21 at 2 46 25 AM

Screenshot 2023-02-21 at 2 47 24 AM

Screenshot 2023-02-21 at 2 55 08 AM

Screenshot 2023-02-21 at 2 55 30 AM

Screenshot 2023-02-21 at 2 56 31 AM

Screenshot 2023-02-21 at 2 56 57 AM

Default Exchange -> Routes messages to a queue by matching a queue name

Screenshot 2023-02-21 at 2 58 21 AM

Screenshot 2023-02-21 at 3 00 37 AM

Screenshot 2023-02-21 at 3 01 10 AM

Screenshot 2023-02-21 at 3 02 32 AM

spring-rabbitmq's People

Contributors

saiashish9 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.