Overview of RabbitMQ

Gökhan GÖKALP

20.04.2017

Trendyol Tech Talk

Agenda

  • Basics
  1. What's the Messaging Queue?
  2. When we need it?
  3. Overview of AMQP Protocol
    1. Why use AMQP?
    2. AMQP Terminology
    3. AMQP Components
    4. AMQP Exchanges
    5. Direct Exchange
    6. Topic Exchange
    7. Fanout Exchange
  • Concepts of RabbitMQ
  1. What's the RabbitMQ?
    1. ​Overview of RabbitMQ
    2. Components of RabbitMQ
  2. RabbitMQ Terminology
  3. RabbitMQ Clients
  • References

What's the
Messaging Queue?

Messaging systems allow applications to communicate by sending messages to each other.

Decoupling!

When we
need it?

We need it when applications need to run asynchronously and want to gain better scalability and flexibility.

Scalability

                        and Flexibility

Overview of AMQP Protocol

Simple definition of AMQP(Advanced Message Queuing Protocol) is Message Oriented Midleware. AMQP creates interoperability between clients and brokers.

Open protocol standart for Enterprise Messaging

Why use AMQP?

Before AMQP, there was simply not a way for one to work with another before AMQP.

 

AMQP creates a common ground which can be used for all message queuing and brokering applications to work and interoperate.

Interoperability

AMQP Terminology

  • Broker: AMQP server called broker. Implementing the AMQP model.
  • Producer: An application which send messages to a queue via an exchange.
  • Consumer: An application which receives message(s).
  • Message: Content of data.

AMQP Components

  • Exchange: Exchanges use messages' routing keys and route them to relevant queues.
  • Queue: Where messages are stored and then consumers get the messages from queues.
  • Bindings: Rules for distributing messages from exchanges to queues.

AMQP Exchanges

  • Direct: Routing key matches the queue name.
  • Topic: Messages are routed to one or many queues based on some rules/wildcards.
  • Fanout: The fanout copies and routes a received message to all queues.

Direct Exchange

A direct exchange delivers messages to queues based on the message routing key. A direct exchange is ideal for the unicast routing of messages.

Topic Exchange

Topic exchanges route messages to queues based on wildcard matches between the routing key and something called the routing pattern specified by the queue binding. Topic exchanges are commonly used for the multicast routing of messages.

Fanout Exchange

The fanout copies and routes a received message to all queues that are bound to it regardless of routing keys or pattern matching as with direct and topic exchanges. Fanout exchanges are ideal for the broadcast routing of messages.

What's the RabbitMQ?

RabbitMQ is lightweight and easy to deploy on premise and in the cloud. Also can be deployed in distributed.


Also RabbitMQ runs on many operating systems.

RabbitMQ is the most widely deployed open source message broker

Overview of RabbitMQ

 

  • RabbitMQ written in Erlang.
  • Implementing AMQP model.
  • With more than 35,000 production deployments of RabbitMQ world-wide at small startups and large enterprises. (e.g. SoundCloud, Instagram, Ford, Cisco)
  • It gives your applications a common platform to send and receive messages
  • Reliable message communication. (Ack, Persistence)

Components of RabbitMQ

  • Broker
  • Management Plugin for Management and Monitoring
    • Web
    • CLI 
  • Plugins
    • Federation plugin
    • Shovel plugin
    • LDAP plugin

RabbitMQ Terminology

  • Broker
  • Virtual host (for isolation)
  • Exchange
    • Direct, Topic, Fanout and Headers Exchanges
  • Queue
  • Bindings
  • Connections (uses TCP for reliable delivery)
  • Channels (lightweight connections that share a single TCP connection)

RabbitMQ Clients

  • .NET
  • Python
  • Java/Scala/Groovy
  • Node.js
  • Go
  • Ruby
  • Erlang
  • many more...

References

Contacts

Thanks...

Made with Slides.com