SlideShare a Scribd company logo
1 of 18
Anypoint MQ Acknowledgement
Mode
• Anypoint MQ lets you determine how to process messages in Anypoint Studio using the
Anypoint MQ connector.
• Two acknowledgement responses can occur:
• Acknowledgement (ack) - Indicates that an application has received a message.
• Negative Acknowledgement (nack) - Indicates that an application doesn’t want the
current message. MQ returns the message to the queue so that another application can
receive the message.
• The Anypoint MQ connector provides tools for setting these states globally or locally in
your Studio application.
Global and Local States
• The Anypoint MQ connector provides global and local states for
specifying how your Studio application receives messages from a
queue.
Global State
• Lets you specify use the Studio Global Element Properties menu to specify a
strategy for processing all messages in a flow. The global state provides these
choices:
• AUTO - The Anypoint MQ connector automatically sends an Ack or Nack at the
end of a flow depending on whether the MQ connector detects a Catch Exception
Strategy (ACK) or a Rollback Exception Strategy (NACK). See Creating an Auto
Acknowledge Flow in Anypoint Studio for an example.
• There are two possible outcomes:
• ACK - The flow succeeds or a Catch Exception Strategy occurs. This code shows
the Catch Exception Strategy:
• MANUAL - An application indicates that it sends its own Ack or Nack using
the Anypoint MQ connector local state. The MQ connector doesn’t provide
any actions automatically. See Creating a Manual Acknowledge Flow in
Anypoint Studio for an example.
• NONE - An application receives a message and the MQ connector
immediately acknowledges and deletes the message. This state risks losing
the message if it is not consumed correctly, but is typically used when
there is a flow of constantly updating messages, such as a news feed where
each subsequent message provides more detail on any messages that
preceded the message. This state takes a risk, but makes coding easier. See
Creating a None Acknowledge Flow in Anypoint Studio for an example.
Local State
• Lets you manually add Anypoint MQ connector instances into your
flow with the Operation field set to ack or nack depending on
whether the application is receiving or rejecting a message.
• You can set a local state using the Anypoint MQ connector’s
Operation field:
Creating an Auto Acknowledge Flow in Anypoint
Studio
• If you are using the auto state, set a choice-exception-strategy and
the Anypoint MQ connector automatically sends the ack or nack
depending on what exception choices you make. The code that
follows illustrates the use of the auto state.
• The following code demonstrates the Studio flows:
• In this example, are these two flows:
• autoHttp - Sets up an HTTP Connector to listen at 0.0.0.0:8081, sets an Anypoint MQ
connector to publish messages, and sets the acknowledgement mode to auto.
• autoMq - Sets an Anypoint MQ connector to consume messages and uses the Java class
RandomError to create possible exceptions to cause the Auto function to send an
acknowledgment or a negative acknowledgement depending on the choices. The logger
lists the ACK or NACK choices on the console.
• The Error handling section of the flow contains a Catch Exception Strategy to cause the
MQ connector to send the ACK, and a Rollback Exception Strategy to cause the MQ
connector to send the NACK.
Auto XML Code
• See Random Error Generator for an explanation of how exceptions
are thrown using a Java testing program, which is called in this
statement:
• <component class="ackmodes.RandomError" doc:name="Java"/>
Creating a Manual Acknowledge Flow in Anypoint
Studio
• You can set the Manual Acknowledgement Mode from the Anypoint
MQ connector’s Global Element Properties:
• In the manual flow, the choice-exception-strategy is also set as in the
flow. In this case, the application uses individual Anypoint MQ
connector instances with the operation set to either Ack or Nack
depending on exceptions sent by the Random Error Java Class.
Manual XML Code
• See Random Error Generator for an explanation of how exceptions
are thrown using a Java testing program, which is called in this
statement:
• <component class="ackmodes.RandomError" doc:name="Java"/>
Creating a None Acknowledge Mode in Anypoint
Studio
• In the NONE flow, the Anypoint MQ connector always sends an ACK
no matter what occurs. The example that follows emphasizes this risk
by using the Java class RandomError to create possible exceptions,
but ignores the exceptions and sends the ACK regardless:
None XML Code
• <http:listener-config name="HTTP_Listener_Configuration_none" host="0.0.0.0" port="8083" doc:name="HTTP Listener
Configuration"/>
• <flow name="noneHttp">
• <http:listener config-ref="HTTP_Listener_Configuration_none" path="/" doc:name="HTTP"/>
• <anypoint-mq:publish config-ref="Anypoint_MQ_Configuration" destination="none" doc:name="Anypoint MQ"/>
• </flow>
• <flow name="noneMq">
• <anypoint-mq:subscriber config-ref="Anypoint_MQ_Configuration" destination="none" doc:name="Anypoint MQ"
pollingTime="10000" acknowledgementMode="NONE"/>
• <component class="ackmodes.RandomError" doc:name="Java"/>
• <logger level="ERROR" doc:name="Logger" message="Always ACKs as soon as a message is received"/>
• </flow>
Random Error Generator
Value Error State What happens in
the Studio Flow
0 - 32 No error, returns
the passed event
context.
Passes through
and the
application sends
an ACK
33 - 65 Error, returns an
illegal state
exception.
Application sends
a NACK
66 - 100 Error, returns an
unsupported
operation
exception.
Application sends
an ACK

More Related Content

What's hot

Benefits of integration with the Mulesoft Anypoint Platform
Benefits of integration with the Mulesoft Anypoint PlatformBenefits of integration with the Mulesoft Anypoint Platform
Benefits of integration with the Mulesoft Anypoint PlatformCloud Analogy
 
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...Angel Alberici
 
Messaging queue - Kafka
Messaging queue - KafkaMessaging queue - Kafka
Messaging queue - KafkaMayank Bansal
 
Application Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftApplication Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftMuleSoft
 
MuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysMuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysAngel Alberici
 
Publish & Subscribe to events using an Event Aggregator
Publish & Subscribe to events using an Event AggregatorPublish & Subscribe to events using an Event Aggregator
Publish & Subscribe to events using an Event AggregatorLars-Erik Kindblad
 
Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.Harish Kumar
 
IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)Juarez Junior
 
IBM Websphere MQ Basic
IBM Websphere MQ BasicIBM Websphere MQ Basic
IBM Websphere MQ BasicPRASAD BHATKAR
 
Serverless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
Serverless Kafka on AWS as Part of a Cloud-native Data Lake ArchitectureServerless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
Serverless Kafka on AWS as Part of a Cloud-native Data Lake ArchitectureKai Wähner
 
Hello, kafka! (an introduction to apache kafka)
Hello, kafka! (an introduction to apache kafka)Hello, kafka! (an introduction to apache kafka)
Hello, kafka! (an introduction to apache kafka)Timothy Spann
 
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Manish Kumar Yadav
 
Meetup milano #4 Anypoint Monitoring and Titanium overview
Meetup milano #4   Anypoint Monitoring and Titanium overviewMeetup milano #4   Anypoint Monitoring and Titanium overview
Meetup milano #4 Anypoint Monitoring and Titanium overviewGonzalo Marcos Ansoain
 
Introduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matterIntroduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matterPaolo Castagna
 
An Introduction to Apache Kafka
An Introduction to Apache KafkaAn Introduction to Apache Kafka
An Introduction to Apache KafkaAmir Sedighi
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache KafkaJeff Holoman
 

What's hot (20)

Benefits of integration with the Mulesoft Anypoint Platform
Benefits of integration with the Mulesoft Anypoint PlatformBenefits of integration with the Mulesoft Anypoint Platform
Benefits of integration with the Mulesoft Anypoint Platform
 
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
Mule 4 migration + Common Integration Challenges : MuleSoft Virtual Muleys Me...
 
Messaging queue - Kafka
Messaging queue - KafkaMessaging queue - Kafka
Messaging queue - Kafka
 
Application Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftApplication Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoft
 
MuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleysMuleSoft Sizing Guidelines - VirtualMuleys
MuleSoft Sizing Guidelines - VirtualMuleys
 
Publish & Subscribe to events using an Event Aggregator
Publish & Subscribe to events using an Event AggregatorPublish & Subscribe to events using an Event Aggregator
Publish & Subscribe to events using an Event Aggregator
 
Managing APIs with MuleSoft
Managing APIs with MuleSoftManaging APIs with MuleSoft
Managing APIs with MuleSoft
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.
 
IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)IBM MQ Overview (IBM Message Queue)
IBM MQ Overview (IBM Message Queue)
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
IBM Websphere MQ Basic
IBM Websphere MQ BasicIBM Websphere MQ Basic
IBM Websphere MQ Basic
 
Serverless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
Serverless Kafka on AWS as Part of a Cloud-native Data Lake ArchitectureServerless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
Serverless Kafka on AWS as Part of a Cloud-native Data Lake Architecture
 
Hello, kafka! (an introduction to apache kafka)
Hello, kafka! (an introduction to apache kafka)Hello, kafka! (an introduction to apache kafka)
Hello, kafka! (an introduction to apache kafka)
 
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
 
Meetup milano #4 Anypoint Monitoring and Titanium overview
Meetup milano #4   Anypoint Monitoring and Titanium overviewMeetup milano #4   Anypoint Monitoring and Titanium overview
Meetup milano #4 Anypoint Monitoring and Titanium overview
 
Dataweave
DataweaveDataweave
Dataweave
 
Introduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matterIntroduction to apache kafka, confluent and why they matter
Introduction to apache kafka, confluent and why they matter
 
An Introduction to Apache Kafka
An Introduction to Apache KafkaAn Introduction to Apache Kafka
An Introduction to Apache Kafka
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 

Viewers also liked

External identity
External identityExternal identity
External identitySon Nguyen
 
Message structure
Message structureMessage structure
Message structureSon Nguyen
 
Anypoint mq (mulesoft) pub sub model
Anypoint mq (mulesoft)  pub sub modelAnypoint mq (mulesoft)  pub sub model
Anypoint mq (mulesoft) pub sub modelKarthik Selvaraj
 
Configuring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connectorConfiguring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connectorShanky Gupta
 
Pagination Done the Right Way
Pagination Done the Right WayPagination Done the Right Way
Pagination Done the Right WayMarkus Winand
 
project report
project reportproject report
project reportsapna-1988
 

Viewers also liked (6)

External identity
External identityExternal identity
External identity
 
Message structure
Message structureMessage structure
Message structure
 
Anypoint mq (mulesoft) pub sub model
Anypoint mq (mulesoft)  pub sub modelAnypoint mq (mulesoft)  pub sub model
Anypoint mq (mulesoft) pub sub model
 
Configuring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connectorConfiguring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connector
 
Pagination Done the Right Way
Pagination Done the Right WayPagination Done the Right Way
Pagination Done the Right Way
 
project report
project reportproject report
project report
 

Similar to Anypoint mq acknowledgement mode

MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...Jitendra Bafna
 
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...Peter Broadhurst
 
How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScalerHow to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScalerBob Bennink
 
Introduction to EMQ
Introduction to EMQIntroduction to EMQ
Introduction to EMQEMQ
 
Crossant Run Modes
Crossant Run ModesCrossant Run Modes
Crossant Run ModesAjay Singh
 
MQ CONNECTOR IN ANYPOINT STUDIO
MQ CONNECTOR IN ANYPOINT STUDIOMQ CONNECTOR IN ANYPOINT STUDIO
MQ CONNECTOR IN ANYPOINT STUDIOakshay yeluru
 
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialPowering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialBenjamin Cabé
 
SMART ULT MANAGEMENT FOR ULTRA-LARGE-SCALE SOFTWARE
SMART ULT MANAGEMENT FOR ULTRA-LARGE-SCALE SOFTWARESMART ULT MANAGEMENT FOR ULTRA-LARGE-SCALE SOFTWARE
SMART ULT MANAGEMENT FOR ULTRA-LARGE-SCALE SOFTWAREijseajournal
 
PLCErrorHunterBrochure
PLCErrorHunterBrochurePLCErrorHunterBrochure
PLCErrorHunterBrochureTony Simeonov
 
Power vc for powervm deep dive tips &amp; tricks
Power vc for powervm deep dive tips &amp; tricksPower vc for powervm deep dive tips &amp; tricks
Power vc for powervm deep dive tips &amp; trickssolarisyougood
 
Scaling Networks Lab Manual 1st Edition Cisco Solutions Manual
Scaling Networks Lab Manual 1st Edition Cisco Solutions ManualScaling Networks Lab Manual 1st Edition Cisco Solutions Manual
Scaling Networks Lab Manual 1st Edition Cisco Solutions Manualnudicixox
 
The Role of Elastic Load Balancer - Apache Stratos
The Role of Elastic Load Balancer - Apache StratosThe Role of Elastic Load Balancer - Apache Stratos
The Role of Elastic Load Balancer - Apache StratosImesh Gunaratne
 
Implementation of MAC-level sleep-scheduling
Implementation of MAC-level sleep-schedulingImplementation of MAC-level sleep-scheduling
Implementation of MAC-level sleep-schedulingOlivier Cervello
 
Qnet dc motor control demo guide
Qnet dc motor control   demo guideQnet dc motor control   demo guide
Qnet dc motor control demo guideSail Khan
 
Can based collision aviodance system for automobiles
Can based collision aviodance system for automobilesCan based collision aviodance system for automobiles
Can based collision aviodance system for automobilesPurnima Kurella
 

Similar to Anypoint mq acknowledgement mode (20)

Fault tolerance
Fault toleranceFault tolerance
Fault tolerance
 
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
MuleSoft Surat Virtual Meetup#31 - Async API, Process Error, Circuit Breaker ...
 
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
 
How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScalerHow to Autoscale in Apache Cloudstack using LiquiD AutoScaler
How to Autoscale in Apache Cloudstack using LiquiD AutoScaler
 
Introduction to EMQ
Introduction to EMQIntroduction to EMQ
Introduction to EMQ
 
Crossant Run Modes
Crossant Run ModesCrossant Run Modes
Crossant Run Modes
 
Tomcat 6: Evolving our server
Tomcat 6: Evolving our serverTomcat 6: Evolving our server
Tomcat 6: Evolving our server
 
MQ CONNECTOR IN ANYPOINT STUDIO
MQ CONNECTOR IN ANYPOINT STUDIOMQ CONNECTOR IN ANYPOINT STUDIO
MQ CONNECTOR IN ANYPOINT STUDIO
 
Load balancer in mule
Load balancer in muleLoad balancer in mule
Load balancer in mule
 
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialPowering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
 
SMART ULT MANAGEMENT FOR ULTRA-LARGE-SCALE SOFTWARE
SMART ULT MANAGEMENT FOR ULTRA-LARGE-SCALE SOFTWARESMART ULT MANAGEMENT FOR ULTRA-LARGE-SCALE SOFTWARE
SMART ULT MANAGEMENT FOR ULTRA-LARGE-SCALE SOFTWARE
 
PLCErrorHunterBrochure
PLCErrorHunterBrochurePLCErrorHunterBrochure
PLCErrorHunterBrochure
 
Msmq connectivity
Msmq connectivityMsmq connectivity
Msmq connectivity
 
Power vc for powervm deep dive tips &amp; tricks
Power vc for powervm deep dive tips &amp; tricksPower vc for powervm deep dive tips &amp; tricks
Power vc for powervm deep dive tips &amp; tricks
 
Scaling Networks Lab Manual 1st Edition Cisco Solutions Manual
Scaling Networks Lab Manual 1st Edition Cisco Solutions ManualScaling Networks Lab Manual 1st Edition Cisco Solutions Manual
Scaling Networks Lab Manual 1st Edition Cisco Solutions Manual
 
The Role of Elastic Load Balancer - Apache Stratos
The Role of Elastic Load Balancer - Apache StratosThe Role of Elastic Load Balancer - Apache Stratos
The Role of Elastic Load Balancer - Apache Stratos
 
Implementation of MAC-level sleep-scheduling
Implementation of MAC-level sleep-schedulingImplementation of MAC-level sleep-scheduling
Implementation of MAC-level sleep-scheduling
 
Kafka aws
Kafka awsKafka aws
Kafka aws
 
Qnet dc motor control demo guide
Qnet dc motor control   demo guideQnet dc motor control   demo guide
Qnet dc motor control demo guide
 
Can based collision aviodance system for automobiles
Can based collision aviodance system for automobilesCan based collision aviodance system for automobiles
Can based collision aviodance system for automobiles
 

More from Son Nguyen

Your new maven friend – the mule maven
Your new maven friend – the mule mavenYour new maven friend – the mule maven
Your new maven friend – the mule mavenSon Nguyen
 
Soa governance for the modern business
Soa governance for the modern businessSoa governance for the modern business
Soa governance for the modern businessSon Nguyen
 
Quality sdk for your apis in minutes!
Quality sdk for your apis in minutes!Quality sdk for your apis in minutes!
Quality sdk for your apis in minutes!Son Nguyen
 
Maven tools & archetypes
Maven tools & archetypesMaven tools & archetypes
Maven tools & archetypesSon Nguyen
 
Let api change your relationship with your doctor
Let api change your relationship with your doctorLet api change your relationship with your doctor
Let api change your relationship with your doctorSon Nguyen
 
Increase revenue and reinvigorate your business with api
Increase revenue and reinvigorate your business with apiIncrease revenue and reinvigorate your business with api
Increase revenue and reinvigorate your business with apiSon Nguyen
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a databaseSon Nguyen
 
How to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceHow to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceSon Nguyen
 
Anypoint runtime manager v1
Anypoint runtime manager v1Anypoint runtime manager v1
Anypoint runtime manager v1Son Nguyen
 
A good api strategy can help turn your
A good api strategy can help turn yourA good api strategy can help turn your
A good api strategy can help turn yourSon Nguyen
 
10 steps to design and build the perfect
10 steps to design and build the perfect10 steps to design and build the perfect
10 steps to design and build the perfectSon Nguyen
 
What is the difference between using private flow
What is the difference between using private flowWhat is the difference between using private flow
What is the difference between using private flowSon Nguyen
 
Troubleshooting mule
Troubleshooting muleTroubleshooting mule
Troubleshooting muleSon Nguyen
 
Running mule as worker role on azure
Running mule as worker role on azureRunning mule as worker role on azure
Running mule as worker role on azureSon Nguyen
 
Real time data processing with anypoint connector for kafka
Real time data processing with anypoint connector for kafkaReal time data processing with anypoint connector for kafka
Real time data processing with anypoint connector for kafkaSon Nguyen
 
Performance tuning in mule
Performance tuning in mulePerformance tuning in mule
Performance tuning in muleSon Nguyen
 
Mule intelli j tips
Mule intelli j tipsMule intelli j tips
Mule intelli j tipsSon Nguyen
 
Introducing the anypoint connector for redis
Introducing the anypoint connector for redisIntroducing the anypoint connector for redis
Introducing the anypoint connector for redisSon Nguyen
 
How to – data integrity checks in batch processing
How to – data integrity checks in batch processingHow to – data integrity checks in batch processing
How to – data integrity checks in batch processingSon Nguyen
 
How soa paved the way for cloud
How soa paved the way for cloudHow soa paved the way for cloud
How soa paved the way for cloudSon Nguyen
 

More from Son Nguyen (20)

Your new maven friend – the mule maven
Your new maven friend – the mule mavenYour new maven friend – the mule maven
Your new maven friend – the mule maven
 
Soa governance for the modern business
Soa governance for the modern businessSoa governance for the modern business
Soa governance for the modern business
 
Quality sdk for your apis in minutes!
Quality sdk for your apis in minutes!Quality sdk for your apis in minutes!
Quality sdk for your apis in minutes!
 
Maven tools & archetypes
Maven tools & archetypesMaven tools & archetypes
Maven tools & archetypes
 
Let api change your relationship with your doctor
Let api change your relationship with your doctorLet api change your relationship with your doctor
Let api change your relationship with your doctor
 
Increase revenue and reinvigorate your business with api
Increase revenue and reinvigorate your business with apiIncrease revenue and reinvigorate your business with api
Increase revenue and reinvigorate your business with api
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a database
 
How to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceHow to – rest api proxy to soap webservice
How to – rest api proxy to soap webservice
 
Anypoint runtime manager v1
Anypoint runtime manager v1Anypoint runtime manager v1
Anypoint runtime manager v1
 
A good api strategy can help turn your
A good api strategy can help turn yourA good api strategy can help turn your
A good api strategy can help turn your
 
10 steps to design and build the perfect
10 steps to design and build the perfect10 steps to design and build the perfect
10 steps to design and build the perfect
 
What is the difference between using private flow
What is the difference between using private flowWhat is the difference between using private flow
What is the difference between using private flow
 
Troubleshooting mule
Troubleshooting muleTroubleshooting mule
Troubleshooting mule
 
Running mule as worker role on azure
Running mule as worker role on azureRunning mule as worker role on azure
Running mule as worker role on azure
 
Real time data processing with anypoint connector for kafka
Real time data processing with anypoint connector for kafkaReal time data processing with anypoint connector for kafka
Real time data processing with anypoint connector for kafka
 
Performance tuning in mule
Performance tuning in mulePerformance tuning in mule
Performance tuning in mule
 
Mule intelli j tips
Mule intelli j tipsMule intelli j tips
Mule intelli j tips
 
Introducing the anypoint connector for redis
Introducing the anypoint connector for redisIntroducing the anypoint connector for redis
Introducing the anypoint connector for redis
 
How to – data integrity checks in batch processing
How to – data integrity checks in batch processingHow to – data integrity checks in batch processing
How to – data integrity checks in batch processing
 
How soa paved the way for cloud
How soa paved the way for cloudHow soa paved the way for cloud
How soa paved the way for cloud
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Anypoint mq acknowledgement mode

  • 2. • Anypoint MQ lets you determine how to process messages in Anypoint Studio using the Anypoint MQ connector. • Two acknowledgement responses can occur: • Acknowledgement (ack) - Indicates that an application has received a message. • Negative Acknowledgement (nack) - Indicates that an application doesn’t want the current message. MQ returns the message to the queue so that another application can receive the message. • The Anypoint MQ connector provides tools for setting these states globally or locally in your Studio application.
  • 3. Global and Local States • The Anypoint MQ connector provides global and local states for specifying how your Studio application receives messages from a queue.
  • 4. Global State • Lets you specify use the Studio Global Element Properties menu to specify a strategy for processing all messages in a flow. The global state provides these choices: • AUTO - The Anypoint MQ connector automatically sends an Ack or Nack at the end of a flow depending on whether the MQ connector detects a Catch Exception Strategy (ACK) or a Rollback Exception Strategy (NACK). See Creating an Auto Acknowledge Flow in Anypoint Studio for an example. • There are two possible outcomes: • ACK - The flow succeeds or a Catch Exception Strategy occurs. This code shows the Catch Exception Strategy:
  • 5. • MANUAL - An application indicates that it sends its own Ack or Nack using the Anypoint MQ connector local state. The MQ connector doesn’t provide any actions automatically. See Creating a Manual Acknowledge Flow in Anypoint Studio for an example. • NONE - An application receives a message and the MQ connector immediately acknowledges and deletes the message. This state risks losing the message if it is not consumed correctly, but is typically used when there is a flow of constantly updating messages, such as a news feed where each subsequent message provides more detail on any messages that preceded the message. This state takes a risk, but makes coding easier. See Creating a None Acknowledge Flow in Anypoint Studio for an example.
  • 6. Local State • Lets you manually add Anypoint MQ connector instances into your flow with the Operation field set to ack or nack depending on whether the application is receiving or rejecting a message. • You can set a local state using the Anypoint MQ connector’s Operation field:
  • 7. Creating an Auto Acknowledge Flow in Anypoint Studio • If you are using the auto state, set a choice-exception-strategy and the Anypoint MQ connector automatically sends the ack or nack depending on what exception choices you make. The code that follows illustrates the use of the auto state. • The following code demonstrates the Studio flows:
  • 8.
  • 9. • In this example, are these two flows: • autoHttp - Sets up an HTTP Connector to listen at 0.0.0.0:8081, sets an Anypoint MQ connector to publish messages, and sets the acknowledgement mode to auto. • autoMq - Sets an Anypoint MQ connector to consume messages and uses the Java class RandomError to create possible exceptions to cause the Auto function to send an acknowledgment or a negative acknowledgement depending on the choices. The logger lists the ACK or NACK choices on the console. • The Error handling section of the flow contains a Catch Exception Strategy to cause the MQ connector to send the ACK, and a Rollback Exception Strategy to cause the MQ connector to send the NACK.
  • 10. Auto XML Code • See Random Error Generator for an explanation of how exceptions are thrown using a Java testing program, which is called in this statement: • <component class="ackmodes.RandomError" doc:name="Java"/>
  • 11. Creating a Manual Acknowledge Flow in Anypoint Studio • You can set the Manual Acknowledgement Mode from the Anypoint MQ connector’s Global Element Properties:
  • 12. • In the manual flow, the choice-exception-strategy is also set as in the flow. In this case, the application uses individual Anypoint MQ connector instances with the operation set to either Ack or Nack depending on exceptions sent by the Random Error Java Class.
  • 13.
  • 14. Manual XML Code • See Random Error Generator for an explanation of how exceptions are thrown using a Java testing program, which is called in this statement: • <component class="ackmodes.RandomError" doc:name="Java"/>
  • 15. Creating a None Acknowledge Mode in Anypoint Studio
  • 16. • In the NONE flow, the Anypoint MQ connector always sends an ACK no matter what occurs. The example that follows emphasizes this risk by using the Java class RandomError to create possible exceptions, but ignores the exceptions and sends the ACK regardless:
  • 17. None XML Code • <http:listener-config name="HTTP_Listener_Configuration_none" host="0.0.0.0" port="8083" doc:name="HTTP Listener Configuration"/> • <flow name="noneHttp"> • <http:listener config-ref="HTTP_Listener_Configuration_none" path="/" doc:name="HTTP"/> • <anypoint-mq:publish config-ref="Anypoint_MQ_Configuration" destination="none" doc:name="Anypoint MQ"/> • </flow> • <flow name="noneMq"> • <anypoint-mq:subscriber config-ref="Anypoint_MQ_Configuration" destination="none" doc:name="Anypoint MQ" pollingTime="10000" acknowledgementMode="NONE"/> • <component class="ackmodes.RandomError" doc:name="Java"/> • <logger level="ERROR" doc:name="Logger" message="Always ACKs as soon as a message is received"/> • </flow>
  • 18. Random Error Generator Value Error State What happens in the Studio Flow 0 - 32 No error, returns the passed event context. Passes through and the application sends an ACK 33 - 65 Error, returns an illegal state exception. Application sends a NACK 66 - 100 Error, returns an unsupported operation exception. Application sends an ACK