Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AMQP in Mulesoft

Arun V S
April 26, 2017

AMQP in Mulesoft

Explained about AMQP and primarily focused on Fan-out Exchange design pattern of Flexible Routing using publish-subscribe paradigm

Arun V S

April 26, 2017
Tweet

More Decks by Arun V S

Other Decks in Education

Transcript

  1. AMQP – Advanced Message Queuing Protocol  A open standard

    application layer protocol for message oriented middleware  The defining features of AMQP are message orientation, queuing, routing, reliability and security  Ii is a wire level protocol
  2. Features  Scalable & Reliable  Persistence delivery ACKs 

    Plugin Extension  Management, STOMP, MQTT, Tracing  Management UI [ Port : 15672 ]  Multiple protocols supported  Tracing  [ Firehose Tracer : rabbitmqctl trace_on]
  3. Features(Contd.)  Clustering Many nodes form a Single Logical Broker

     Flexible routing Exchange  Highly Available Queue Queue Mirroring
  4. Features(Contd.)  Metering  Rate limiting (baseline and SLA based)

     Specifies maximum value for the number of messages processed per time period and rejects any messages beyond the maximum  Throttling  Throttles the number of messages per time period processed by an API. Queues any messages beyond the maximum for later processing
  5. Flexible Routing Message Exchange Message Exchange Types  Fan out

    Exchange  Direct Exchange  Topic Exchange
  6. Config file  <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="${http.port}" doc:name="HTTP Listener Configuration"/>

    <amqp:connector name="AMQP_0_9_Connector" validateConnections="true" activeDeclarationsOnly="true" doc:name="AMQP-0-9 Connector"/> <flow name="Publisher"> <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/> <amqp:outbound-endpoint exchangeName="RabbitMQExchange" responseTimeout="10000" exchange-pattern="request-response" connector- ref="AMQP_0_9_Connector" doc:name="AMQP Message Publish to Exchange- fanout" exchangeType="fanout" exchangeDurable="true"/> </flow>
  7. Config file (Contd.)  <flow name="Consumer1"> <amqp:inbound-endpoint queueName="Queue1" exchangeType="fanout" responseTimeout="10000"

    exchange-pattern="request-response" doc:name="AMQP Message subscribed from Queue1" connector- ref="AMQP_0_9_Connector" exchangeDurable="true" exchangeName="RabbitMQExchange"/> <logger message="Queue1 Logger : #[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Queue1 Logger"/> <set-payload value="From Queue1 : #[message.payloadAs(java.lang.String)]" doc:name="Set Payload"/> </flow>
  8. Config file(Contd.)  <flow name="Consumer2"> <amqp:inbound-endpoint exchangeName="RabbitMQExchange" queueName="Queue2" exchangeType="fanout" exchangeDurable="true"

    responseTimeout="10000" exchange-pattern="request-response" connector- ref="AMQP_0_9_Connector" doc:name="AMQP Message subscribed from Queue2"/> <logger message="Queue2 Logger: #[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Queue2 Logger"/> <set-payload value="From Queue2 : #[message.payloadAs(java.lang.String)]" doc:name="Set Payload"/> </flow>