Patna MuleSoft Meetup Group (9th
Meetup)
Deep Dive into Anypoint MQ and DLQ
02th April 2022
Organizer
About: Amit Mohan
● Mulesoft mentor
● Working as Solution
Architect at Apisero Inc.
● 11 + year of Total IT
Experience. 4+ years in
Mulesoft.
● Certified MuleSoft
Developer and Architect.
About: Om Prakash
● Salesforce MVP
● Founder AppyCrown Pvt
Ltd
● Leader at Salesforce
Developer Group Motihari
Meetup.
● 10 + years of IT experience
Speaker
Abhishek Bathwal
Associate Solution Architect
Apisero Inc
About:
● Mulesoft Ambassador
● Working as Associate Solution Architect at Apisero Inc.
● 6+ year of Total Experience. 4+ years in Mulesoft.
● Certified MuleSoft Developer and Architect.
● Guwahati and Lucknow Meetup Leader
Safe Harbour Statement
● Both the speaker and the host are organizing this meet-up in individual capacity only. We are
not representing our companies here.
● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any
responsibility that same solution will work for your business requirements.
● This presentation is not meant for any promotional activities.
4
A recording of this meetup will be uploaded to events page within 24 hours.
Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab.
Make it more Interactive!!!
Give us feedback! Rate this meetup session by filling feedback form at the end of the day.
We Love Feedbacks!!! Its Bread & Butter for Meetup.
Housekeeping
5
6
Agenda
● Anypoint MQ
○ Queue Types
○ Connector Types
○ Configuration
○ Error Types
● Circuit Breaker
● DLQ
● Is a cloud messaging service that performs asynchronous messaging scenarios between
applications such as queuing and pub/sub.
● Is managed easily using Anypoint Platform.
● Supports large payloads (max 10 MB), encryption, queuing, and publish/subscribe
(pub/sub)paradigms.
● Enables easy connection to non-Mule applications using the REST API.
● Provides dead-letter queue (DLQ) for undeliverable messages.
● Displays usage statistics on the number of messages and API requests.
Note: Anypoint MQ is not included in the trial account. We require a separate Enterprise subscription.
Message content can be text, CSV, or JSON. The maximum size of a message is 10 MB.If the payload
contains any format except text (such as CSV, HTML, JSON, and XML), Anypoint MQ converts it to a string
before sending, which increases the payload size. This conversion might result in the payload exceeding the
maximum payload size of 10 MB and causing a Payload too large error.
Anypoint MQ
8
Queue Types
● Exchange: The exchange is used for broadcasting a
messages, like one message to multiple consumers. If
any message is send to the exchange, it will be
forwarded to all the the queues binded with it.
● FIFO (first in, first out): FIFO is a normal queue
where messages are stored.The FIFO queue is used
when message need to be consumed in order.
● Queue: The queue is a storage area where messages
are stored for processing.
9
Connector Types
● Subscriber to subscribe to the queue and listen for the receiving
message. (Event source)
● Publish to publish the message to the Queue.
● Consumer to consume a message from the queue.
● Ack to send an acknowledgement to the queue about the
successful consumption of the message and delete the message
from in-flight status.
● Nack to send negative acknowledgement to the queue stating the
consumed message is not processed successfully; changes the
status of the message from in-flight to in-queue to be consumed
again by an available consumer.
10
Configuration
Main elements require:
● URL
● Client API ID
● Client Secret
11
Error Types
● ANYPOINT-MQ:CONNECTIVITY
● ANYPOINT-
MQ:DESTINATION_NOT_FOUND
● ANYPOINT-MQ:ILLEGAL_BODY
● ANYPOINT-MQ:PUBLISHING
● ANYPOINT-MQ:RETRY_EXHAUSTED
● ANYPOINT-MQ:ACKING
● ANYPOINT-MQ:CONSUMING
● ANYPOINT-MQ:TIMEOUT
● ANYPOINT-MQ:NACKING
12
Circuit Breaker
The Subscriber source provides circuit breaking capability, which enables you to
control how the connector handles errors that occur while processing a consumed
message.
For example, when connecting to an external service, you can use the circuit breaker
to handle any downtime of that service. The circuit breaker allows the system to stop
making requests and allows the external service to recover under a reduced load.
The circuit breaker has three states:
● Closed: Normal retrieval and processing of message based on the subscriber
strategy.
● Half Open: Retrieve a single message and attempt to process it.
● Open: Scheduled message fetch are skipped and no more messages are
processed.
13
Configure the Circuit Breaker
● onErrorTypes:
The error types that count as a
failure during the flow
execution.By default, all errors
count as a circuit failure.
● errorsThreshold:
The number of onErrorTypes
errors that must occur for the
circuit breaker to open.
● tripTimeout:
How long the circuit remains open
once errorsThreshold is reached.
● The dead-letter queue (or undelivered-message
queue) is the queue to which messages are sent if
they cannot be routed to their correct destination.
Few things to remember before creating a DLQ.The
DLF and parent queue both need to be:
● Same type of queue (standard or FIFO)
● Created in the same geographical region
● Created in the same environment and owned by
the same Anypoint Platform account.
DLQ
Demo
Q&A
Take a stand !
17
●Nominate yourself for the next meetup speaker and suggest a topic as well.
Get ready to WIN a Special Gift from MuleSoft Community
Quiz Time
19
● Share:
○ Tweet using the hashtag #MuleSoftMeetups
○ Invite your network to join: https://meetups.mulesoft.com/patna/
● Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
What’s next?
Thank you

Patna_Meetup_MQ

  • 1.
    Patna MuleSoft MeetupGroup (9th Meetup) Deep Dive into Anypoint MQ and DLQ 02th April 2022
  • 2.
    Organizer About: Amit Mohan ●Mulesoft mentor ● Working as Solution Architect at Apisero Inc. ● 11 + year of Total IT Experience. 4+ years in Mulesoft. ● Certified MuleSoft Developer and Architect. About: Om Prakash ● Salesforce MVP ● Founder AppyCrown Pvt Ltd ● Leader at Salesforce Developer Group Motihari Meetup. ● 10 + years of IT experience
  • 3.
    Speaker Abhishek Bathwal Associate SolutionArchitect Apisero Inc About: ● Mulesoft Ambassador ● Working as Associate Solution Architect at Apisero Inc. ● 6+ year of Total Experience. 4+ years in Mulesoft. ● Certified MuleSoft Developer and Architect. ● Guwahati and Lucknow Meetup Leader
  • 4.
    Safe Harbour Statement ●Both the speaker and the host are organizing this meet-up in individual capacity only. We are not representing our companies here. ● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any responsibility that same solution will work for your business requirements. ● This presentation is not meant for any promotional activities. 4
  • 5.
    A recording ofthis meetup will be uploaded to events page within 24 hours. Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab. Make it more Interactive!!! Give us feedback! Rate this meetup session by filling feedback form at the end of the day. We Love Feedbacks!!! Its Bread & Butter for Meetup. Housekeeping 5
  • 6.
    6 Agenda ● Anypoint MQ ○Queue Types ○ Connector Types ○ Configuration ○ Error Types ● Circuit Breaker ● DLQ
  • 7.
    ● Is acloud messaging service that performs asynchronous messaging scenarios between applications such as queuing and pub/sub. ● Is managed easily using Anypoint Platform. ● Supports large payloads (max 10 MB), encryption, queuing, and publish/subscribe (pub/sub)paradigms. ● Enables easy connection to non-Mule applications using the REST API. ● Provides dead-letter queue (DLQ) for undeliverable messages. ● Displays usage statistics on the number of messages and API requests. Note: Anypoint MQ is not included in the trial account. We require a separate Enterprise subscription. Message content can be text, CSV, or JSON. The maximum size of a message is 10 MB.If the payload contains any format except text (such as CSV, HTML, JSON, and XML), Anypoint MQ converts it to a string before sending, which increases the payload size. This conversion might result in the payload exceeding the maximum payload size of 10 MB and causing a Payload too large error. Anypoint MQ
  • 8.
    8 Queue Types ● Exchange:The exchange is used for broadcasting a messages, like one message to multiple consumers. If any message is send to the exchange, it will be forwarded to all the the queues binded with it. ● FIFO (first in, first out): FIFO is a normal queue where messages are stored.The FIFO queue is used when message need to be consumed in order. ● Queue: The queue is a storage area where messages are stored for processing.
  • 9.
    9 Connector Types ● Subscriberto subscribe to the queue and listen for the receiving message. (Event source) ● Publish to publish the message to the Queue. ● Consumer to consume a message from the queue. ● Ack to send an acknowledgement to the queue about the successful consumption of the message and delete the message from in-flight status. ● Nack to send negative acknowledgement to the queue stating the consumed message is not processed successfully; changes the status of the message from in-flight to in-queue to be consumed again by an available consumer.
  • 10.
    10 Configuration Main elements require: ●URL ● Client API ID ● Client Secret
  • 11.
    11 Error Types ● ANYPOINT-MQ:CONNECTIVITY ●ANYPOINT- MQ:DESTINATION_NOT_FOUND ● ANYPOINT-MQ:ILLEGAL_BODY ● ANYPOINT-MQ:PUBLISHING ● ANYPOINT-MQ:RETRY_EXHAUSTED ● ANYPOINT-MQ:ACKING ● ANYPOINT-MQ:CONSUMING ● ANYPOINT-MQ:TIMEOUT ● ANYPOINT-MQ:NACKING
  • 12.
    12 Circuit Breaker The Subscribersource provides circuit breaking capability, which enables you to control how the connector handles errors that occur while processing a consumed message. For example, when connecting to an external service, you can use the circuit breaker to handle any downtime of that service. The circuit breaker allows the system to stop making requests and allows the external service to recover under a reduced load. The circuit breaker has three states: ● Closed: Normal retrieval and processing of message based on the subscriber strategy. ● Half Open: Retrieve a single message and attempt to process it. ● Open: Scheduled message fetch are skipped and no more messages are processed.
  • 13.
    13 Configure the CircuitBreaker ● onErrorTypes: The error types that count as a failure during the flow execution.By default, all errors count as a circuit failure. ● errorsThreshold: The number of onErrorTypes errors that must occur for the circuit breaker to open. ● tripTimeout: How long the circuit remains open once errorsThreshold is reached.
  • 14.
    ● The dead-letterqueue (or undelivered-message queue) is the queue to which messages are sent if they cannot be routed to their correct destination. Few things to remember before creating a DLQ.The DLF and parent queue both need to be: ● Same type of queue (standard or FIFO) ● Created in the same geographical region ● Created in the same environment and owned by the same Anypoint Platform account. DLQ
  • 15.
  • 16.
  • 17.
    Take a stand! 17 ●Nominate yourself for the next meetup speaker and suggest a topic as well.
  • 18.
    Get ready toWIN a Special Gift from MuleSoft Community Quiz Time
  • 19.
    19 ● Share: ○ Tweetusing the hashtag #MuleSoftMeetups ○ Invite your network to join: https://meetups.mulesoft.com/patna/ ● Feedback: ○ Fill out the survey feedback and suggest topics for upcoming events ○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program What’s next?
  • 20.