Spring AMQP - RabbitMQ CheatSheet


AMQP:

  1. Types of JMS

    1. point to point model (One to one (queues))
    2. publisher and subscriber model ( One to many (topics))
  2. Types of AMQP

    1. Direct exchange = JMS point-to-point messaging based on queues
    2. Fanout exchange = JMS publish-subscribe messaging based on topics
    3. Topic exchange = JMS publish-subscribe messaging based on topics
    4. Header exchange = JMS publish-subscribe messaging based on topics
  3. The AMQP specification is an open specification being developed by the AMQP working group.

  4. There are currently several open source implementations fro AMQP available like

    1. RabbitMQ
    2. StormMQ
    3. Apache Qpid.
  5. RabbitMQ, Kafka, and ActiveMQ all serve the same basic purpose

    1. Kafka is a high-throughput distributed messaging system
    2. RabbitMQ is an AMQP based reliable message broker.
    3. ActiveMQ and Kafka are both Apache products, and both written in Java
    4. RabbitMQ is written in Erlang.
    5. Apache ActiveMQ is a message broker which fully implements the Java Messaging Service API
  6. JMS providers

    1. Amazon SQS's Java Messaging Library
    2. Apache ActiveMQ.
    3. Apache Qpid, using AMQP
    4. IBM MQ
  7. https://www.rabbitmq.com/tutorials/tutorial-one-spring-amqp.html

  8. Types of AMQP Exchange

    1. Direct
    2. Fanout
    3. Headers
    4. Match
    5. Trace
    6. Topic
  9. RabbitMQ Coding architecture

    1. ConnectionFactory
    2. Connection
    3. Channel => Area in Real world => Within channel we create Queues => RabbitTemplate is simmilar to channel
    4. Queue
    5. Exchange
    6. Routingkey
    7. BindingBuilder => Bind queue to Exchange with RoutingKey
  10. Work Queues

    1. Work Queues are developed based on Aka Task Queues
    2. Work Queues is to avoid doing a resource-intensive task immediately and having to wait for it to complete.
  11. Consumer Acknowledgements and Publisher Confirms (protocols for Acknowledgements)

    1. Consumer Acknowledgements : Delivery processing acknowledgements from consumers to RabbitMQ
    2. publisher confirms : Broker acknowledgements to publishers
    3. Both features build on the same idea and are inspired by TCP. They are essential for reliable delivery both from publishers to RabbitMQ nodes and from RabbitMQ nodes to consumers
    4. channel.basicReject(deliveryTag, requeue)
    5. defaultRequeueRejected=false
    6. channel.basicAck()
    7. delivery acknowledgement are usually exposed as operations on a channel in client libraries.