《3157 - Asynchronous Communication, Discover when IBM MQ is the Best Choice.pdf》由會員分享,可在線閱讀,更多相關《3157 - Asynchronous Communication, Discover when IBM MQ is the Best Choice.pdf(56頁珍藏版)》請在三個皮匠報告上搜索。
1、October 21-24,2024Mandalay Bay Convention CenterLas Vegas,NevadaSession Code:31573157Richard CoppenIBM MQ Developer Advocate(IBM)Asynchronous communication,discover when IBM MQ is the best choice#IBMTechXchangeNotices and disclaimersCertain comments made in this presentation may be characterized as
2、forward looking under the Private Securities Litigation Reform Act of 1995.Forward-looking statements are based on the companys current assumptions regarding future business and financial performance.Those statements by their nature address matters that are uncertain to different degrees and involve
3、 a number of factors that could cause actual results to differ materially.Additional information concerning these factors is contained in the Companys filings with the SEC.Copies are available from the SEC,from the IBM website,or from IBM Investor Relations.Any forward-looking statement made during
4、this presentation speaks only as of the date on which it is made.The company assumes no obligation to update or revise any forward-looking statements except as required by law;these charts and the associated remarks and comments are integrally related and are intended to be presented and understood
5、together.2024 International Business Machines Corporation.All rights reserved.This document is distributed“as is”without any warranty,either express or implied.In no event shall IBM be liable for any damage arising from the use of this information,including but not limited to,loss of data,business i
6、nterruption,loss of profit or loss of opportunity.Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved.Actual performance,cost,savings or other results in other operating environments may vary.Workshops,sessions and ass
7、ociated materials may have been prepared by independent session speakers,and do not necessarily reflect the views of IBM.Not all offerings are available in every country in which IBM operates.Any statements regarding IBMs future direction,intent or product plans are subject to change or withdrawal w
8、ithout notice.IBM,the IBM logo,and are trademarks of International Business Machines Corporation,registered in many jurisdictions worldwide.Other product and service names might be trademarks of IBM or other companies.A current list of IBM trademarks is available on the Web at“Copyright and trademar
9、k information”at: TechXchange|2024 IBM Corporation2#IBMTechXchange3Session JourneyIBM TechXchange|2024 IBM Corporation010203040506Insights from apidaysWhy consider Async?Async messaging conceptsWhy IBM MQWorking with IBM MQDemoInsights from apidaysapidays London September 2024 IBM TechXchange|2024 I
10、BM Corporation“to deliver better customer experiences and streamline business processes,AI APIs have become an indispensable tool for companies seeking to stay ahead of the curve in todays competitive business environment.”1500+participantshttps:/www.apidays.global/london/https:/www.apidays.global/l
11、ondon/#IBMTechXchangeIntroducing AsyncAPIAsyncAPI provides a mechanism for service owners to document and describe their messaging endpoints,and the messages exchangedLike OpenAPI for REST applicationsMore than just a spec for yaml,AsyncAPI is home to an ecosystem of technologies and toolsEnables de
12、veloper led discovery to achieve rapid prototyping of messaging solutionsLike many messaging providers,APIs and protocols,IBM MQ has an open community binding for AyncAPIThis allows solution architects to document MQ endpoints in a developer centric way5IBM TechXchange|2024 IBM Corporation#IBMTechXc
13、hangeAsyncAPI apidaysLondon6IBM TechXchange|2024 IBM CorporationReally strong engagement on OpenAPI and AsyncAPILots of in-depth conversations“What is What is AsyncAPIAsyncAPI?”“So,Ive got this webhook that runs for several Ive got this webhook that runs for several daysdays waiting for a response”“
14、I have a microa micro-monolithmonolith”Openness in describing challengesTechnicalOrganisationalArchitecturalTransformational#IBMTechXchange7IBM TechXchange|2024 IBM CorporationPhoto courtesy JOHN K THORNE:https:/flic.kr/p/2ocC2HPHTTP 2XXEventual Consistency#IBMTechXchange8IBM TechXchange|2024 IBM Co
15、rporation“it depends,remember not to fall victim to the law of instrument.”Frank KilcomminsOpenAPI evangelist apidays#IBMTechXchange9Why consider asynchronous messaging?IBM TechXchange|2024 IBM Corporation#IBMTechXchangeDirect ConnectionsResponsive for simple queriesDesign requires call to be blocki
16、ngDesign requires call to be blocking e.g.,forward processing scope depends on response Fail&retry pattern is safe Fail&retry pattern is safe e.g.,idempotentSimple golden path logicSimple golden path logic flowsGood fit for interactive sessionsinteractive sessionsDifficult to remain responsive Diffi
17、cult to remain responsive as solutions scale and load increasesDependent downdown-streams services must be availablestreams services must be available to avoid brittle solutionsError handling&recovery logic can become complexrecovery logic can become complexCan become difficult to understand relatio
18、nships difficult to understand relationships between servicesbetween services10IBM TechXchange|2024 IBM CorporationService 1Service 1Service 2Service 2BenefitsConsiderations#IBMTechXchange11An application centric approachIBM TechXchange|2024 IBM CorporationApplication1Application2Application4Applica
19、tion3#IBMTechXchange12Need to avoid complexityIBM TechXchange|2024 IBM CorporationApplication1Application2Application4Application3#IBMTechXchange13.even out bumpseven out bumps in utilization and throughputremain responsiveremain responsive and catch-up with workloadAbsorb shocksRun at different spe
20、edsIBM TechXchange|2024 IBM CorporationPhoto curtesy:Avsar Aras.https:/en.wikipedia.org/wiki/Shock_absorber#/media/File:Mini_Shocks.JPG Photo curtesy:Mustang Joe.https:/flic.kr/p/x8YA2b#IBMTechXchangeDecoupled ConnectionsCalling applications remain responsiveapplications remain responsiveDownstream
21、processing can be longer runningprocessing can be longer runningError handling and remedial actions may be remedial actions may be delegateddelegatedToleration of outagesToleration of outages in downstream servicesSolution scale independent of servicesSolution scale independent of servicesPromotes r
22、eactive and eventreactive and event-driven architecturesdriven architecturesBroker must be made resilientBroker must be made resilientError handlingError handling must be considered as part of initial part of initial designdesignOutages might require broker expertiseOutages might require broker expe
23、rtiseBroker can become an implicit part of the endBroker can become an implicit part of the end-toto-end solutionend solution14IBM TechXchange|2024 IBM CorporationBenefitsConsiderationsService 1Service 1Service 2Service 2BrokerBrokerService 4Service 4Service 3Service 3#IBMTechXchange15Modern applica
24、tionsModern applicationsDesigned as capability ecosystems and not just discrete functionIntegrated into daily life with multiple points of engagement Evolve quicklyDeploy across multiple platforms and runtime environmentIntegrate and react in real-time with other systems and services(loosely coupled
25、)Provide business insight with event stream processingIBM TechXchange|2024 IBM CorporationDirectDirect andand DecoupledDecoupled#IBMTechXchangeArchitectural IdeologiesSingle and easily standardized integration patternstandardized integration patternEverything is an HTTPS/REST connection Everything i
26、s an HTTPS/REST connection Simple to scale?Simple to scale?SimpleSimple connection orientated broker=complex clientbroker=complex clientConstrained set verbsConstrained set verbs e.g.,GET,PUT,DELETE,PATCHSolution designers must tradetrade-off between integration simplicity off between integration si
27、mplicity and endand end-toto-end solution sophisticationend solution sophisticationIntegration pattern is optimizedIntegration pattern is optimized based on broker,API and implementation language choicesApplications benefit from different broker stylesbenefit from different broker styles e.g.,queue
28、or log orientatedRicher message exchange patternsRicher message exchange patterns available to solution designersSmart brokers promote simple applicationsSmart brokers promote simple applicationsC Complexityomplexity is pushed back into brokerpushed back into brokerSolution designers can easily inte
29、grate services across multiple integrate services across multiple runtimes,protocols,APIsruntimes,protocols,APIs(both new and existing)16IBM TechXchange|2024 IBM CorporationDirectDecoupledService 1Service 1Service 2Service 2Service 1Service 1Service 2Service 2BrokerBrokerService 4Service 4Service 3S
30、ervice 3#IBMTechXchange17Simple application,Smart BrokersIBM TechXchange|2024 IBM CorporationApplicationCommsCommsSecuritySecurityTransactionsTransactionsPersistencePersistenceScaleScaleRecoveryRecoveryBusiness ValueStateStateResilienceResilienceComplexity#IBMTechXchange18Basic Asynchronous messagin
31、g concepts and patternsIBM TechXchange|2024 IBM Corporation#IBMTechXchange19Concepts:messagesmessagesMessages are more than just the payload;they are a statement of purposeHeader and properties provide processing context for the payload,without inspecting it e.g.,the priority of the messageReply-to
32、destination plus correlation id power async conversational messaging patterns like request-responseBackout Count provides a mechanism to avoid poison messages consuming messaging resourcesMessages timestamp and expiry interval can be used to inform the broker when a message is no longer useful,so it
33、 can be removedMessage correlation enables the application to identify related messagesIBM TechXchange|2024 IBM CorporationHeaderPropsPayloadHeaderPropsPayload1234#IBMTechXchange20Concepts:destinationsdestinationsOften overlooked,destinations,or queues,are a basic building block to enable applicatio
34、n decouplingCan be remote references to queues hosted elsewhere where the broker does the routingReal-time control over put and get capability provides known state during maintenance periodsControl over maximum queue depth provides back-pressure to upstream application workloadAlias queues provide a
35、n abstraction and flexibility to reroute messages with zero code changesQueue persistence ensures solution level QoS and message resilienceIBM TechXchange|2024 IBM Corporationmax#IBMTechXchange21Patterns:point-to-point231Messages are put to queue by a producer applicationMessages are stored on the q
36、ueue awaiting consumptionConsumer applications connect to the queue and get(remove)messages in FIFO orderIBM TechXchange|2024 IBM CorporationJMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0Point-to-point messaging allows application to communicate in an asynchronous way.Producers and consumer pairs
37、need only to know about the messaging queue,how to connect to it and the message structure;they have no knowledge of each other.Producer and consumer applications can run at different speeds and do not have to be on-line at the same time.AMQPAMQPRESTRESTQueueMessageProducerMessageConsumer+Optionally
38、,applications may browse messages,leaving them on the queuepoint-to-point123#IBMTechXchange22Patterns:many-to-many231Messages put to queue by multiple concurrent producer applications Messages are stored on queue awaiting consumptionConsumer applications get messages from queue based on FIFO order o
39、r optionally select messages based on propertiesIBM TechXchange|2024 IBM CorporationIt is a common misconception that a queue can only be used by a single producing and consuming pair,when in fact,you can have several producers and consumers all connected to the same message queue.Consumers can cons
40、ume messages in FIFO order or based on selection criteria using the properties of the message.123point-to-pointJMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0AMQPAMQPRESTRESTQueueMessageProducerMessageConsumerMessageProducerMessageConsumer$#IBMTechXchange23Patterns:publish-subscribe231Message consu
41、mers subscribe to a topic relating to events they are interested inMessages producer publishes message to a topicMessage broker matches subscribers for topic where new events has been publishedIBM TechXchange|2024 IBM CorporationJMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0Publish-subscribe messa
42、ging is a one-to-many distribution pattern.Unlike point-to-point messaging,a copy of the message is delivered to every consumer(subscriber)that has registered interest in a topic.This pattern forms the basic framework of event distribution and Event Driven Architectures(EDAs).123AMQPAMQPTopic/sport/
43、rugby/scoresMessageConsumerMessageConsumerSubscribeSubscribePublishMessageProducerPublishPublish44A copy of the event message is delivered to all matching subscribers of the topicMQTTMQTTRESTRESTpub-sub#IBMTechXchange24Patterns:worker queues231+Message produced to worker queue while maintaining a re
44、sponsive system upstreamTransient queue storage acts as a shock-absorber to even out load and processing times Consumers collaborate to manage incoming workloadIBM TechXchange|2024 IBM CorporationMessages produced based on rate of upstream activity and stored on a worker queue awaiting onward proces
45、sing by consuming applications.This pattern is useful for dealing with unpredictable workloads or managing time-consuming downstream processing.Consumers can scale up and down to react to workload e.g.,scaling pods or containers.WorkerQueueMessageConsumerMessageProducerMessageConsumerMessageConsumer
46、123A similar pattern can be achieved over publish-subscribe with JMS/Jakarta shared-subscriptions or with managed subscriptionscollaborationpoint-to-pointpub-subJMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0AMQPAMQPMQTTMQTTRESTREST#IBMTechXchange25Patterns:request-response2314Message producer conn
47、ects to the queue manager and creates a temporary reply-to destinationProducer sends a request message with the reply-to property set to the reply-to destinationResponse application consumes the application and begins processingIBM TechXchange|2024 IBM CorporationRequest-response messaging facilitat
48、es a conversational exchange in an asynchronous framework.Whereas queues and topics enable the movement of data in one direction,request-response extends this further by allowing bi-directional communication.This is a versatile pattern that can combine both point-to-point and publish-subscribe commu
49、nication frameworks.Response application sends a reply message to the reply-to destination1234RequestQueueRequestorAppResponseAppReply-toQueuecreatesReply-to55Original producer consumes the reply message and correlates with original request message.point-to-pointpub-subJMSJMSJakarta Jakarta Messagin
50、g 3.0Messaging 3.0AMQPAMQPMQTTMQTTRESTREST#IBMTechXchange26Patterns:event stream231Message consumer subscribes to a topic e.g.,/sport/rugby/scoresConsumer has previously seen message 0,so begins to consume messages 1,2,3 and onwardsMessage producer adds messages to the end of the log.Broker makes me
51、ssages available once replication has completedIBM TechXchange|2024 IBM CorporationUnlike delivery orientated message consumers,event stream consumers never delete a message as part of their processing.Multiple consumers can replay messages,multiple times and historic data remains available for new
52、and old consumers.23pub-subkafkakafka1MessageProducerMessageConsumer0 01 12 23 34 45 56 67 78 8Topic/sport/rugby/scores#IBMTechXchange27Why IBM MQ?IBM TechXchange|2024 IBM Corporation#IBMTechXchangeLots of messaging to choose fromApache ActiveMQAmazon Simple Queue ServiceEMQXSolace PubSub+Event Brok
53、erGoogle Cloud Pub/SubAzure Service BusTIBCO PlatformMessagingIronMQBlazingMQAMQPRabbitMQApache PulsarCloudAMQPOracle Messaging Cloud ServiceConfluent Data Streaming PlatformMuleSoft Anypoint MQMQTTTrademark acknowledgementsIBM and the IBM logo are trademarks of International Business Machines Corpo
54、ration,registered in many jurisdictions.A current list of IBM trademarks is available on the web at Copyright and trademark information Other company,product and service names and logos may be trademarks,registered marks or service marks of their respective owners.IBM TechXchange|2024 IBM Corporatio
55、nIBM MQ Basic Async Messaging Conceptspoint-to-pointmany-to-manypublish-subscribeworker-queuesrequest-responseevent-streamJMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0AMQPAMQPMQTTMQTTRESTREST.NET.NETMQIMQI#IBMTechXchange30IBM MQExtended Async PatternsIBM TechXchange|2024 IBM Corporationstreaming
56、queuesdelivery delaymessage listenersbackout queuesDead letter queuesdead letter handlersEnterprise MessagingEncapsulating and moving data inside messages between systems and applications running on different operating systems,written in different languagesEnterprise messaging is designed with featu
57、res that cater to the unique needs of businessesIBM TechXchange|2024 IBM Corporationx86/pythonMainframe/COBOLARM/CRS6000/Javax86/GolangNode.jsJMSHTTP/RESTMessaging is the Messaging is the trusted wiringtrusted wiringbetween the different parts of business,securely taking data and files to where they
58、 need to goIBM TechXchange|2024 IBM CorporationOrderingTravel/LogisticsSupply chainInvoicingManufacturingBanking#IBMTechXchangeIBM TechXchange|2024 IBM CorporationDeploymentFlexibilityReady to power your applications wherever they are Software forIBM ZIBM ZLinuxWindowsAIXIBMiMQ ApplianceMQ Appliance
59、Software forHPE NonStop/HPE NonStop/Virtualized NonStopVirtualized NonStopHybrid Cloud Hybrid Cloud(Distributed)Software(Distributed)Software Can be deployed onpremises and in any eligible public cloud.SaaSSaaSAmazon Web ServicesKubernetesAzureGoogleAWSSee full list ofEligible Public CloudsOn Premis
60、esOn PremisesSoftwareSoftware for hybrid cloud deployments(in VMs and containers),software for IBM ZIBM Z,and MQ ApplianceMQ AppliancePublic cloudPublic cloudCustomer-managed softwaresoftware deployed to baremetal,VMs,or in containerscontainersSaaSSaaSIBM-managed SaaSSaaS,hosted in IBM Cloud and AWS
61、 public cloudpublic cloudIBM MQ IBM MQ|30 Years of Innovation#IBMTechXchange34Application Runtimes and EnvironmentsIBM TechXchange|2024 IBM Corporation Auto-scalersCICSCICSIMSIMS#IBMTechXchangeXMS/.NETXMS/.NETBuilt in support for.NET applications running on Windows and LinuxAMQP 1.0AMQP 1.0Configura
62、ble AMQP listener provides support for OASIS standard AMQP 1.0MQTT 3.1.1MQTT 3.1.1Configurable MQTT listener provides support for OASIS standard v3.1.1/ISO/IEC 20922RESTRESTREST API for integration with simple messaging applications plus configuration API with MQSC35MQIMQIIBM MQs core API.Underpins
63、multiple language bindings,including COBOL and CJMS,JMS,Jakarta Messaging 3.0Jakarta Messaging 3.0&Classes for Java&Classes for JavaBuilt in support for JMS and Jakarta Messaging support.Protocols and APIsIBM TechXchange|2024 IBM Corporation#IBMTechXchangeLanguage Bindings&SamplesNode.JSNode.JS lang
64、uage binding backed by IBM MQ MQI APIGoGo/GMS language bindings backed by IBM MQ MQI APIPythonPyMQI language binding backed by IBM MQ MQI API3rd party interfacesPerl:search.cpan.org/dist/MQSeries/PHP: TechXchange|2024 IBM Corporationhttps:/ibm.biz/mq-dev-patternshttps:/ APIs and ProtocolsMQ supports
65、 a wide range of application styles,from the simplest of messaging needs through to the richestMQ is the transport;messages produced from any API or protocol can be received by any other API or protocolIBM TechXchange|2024 IBM CorporationQueueJMSJakartaCOBOLMQTT.NETMQIREST#IBMTechXchangeDeploy MQ wh
66、ere your Deploy MQ where your applications and data reside applications and data reside to connect your systems together.IBM MQ supports a range of platforms,languages,APIs and runtimesLoose coupling Loose coupling of applications provides flexibility to prototype,alter and extend with minimal impac
67、t to application estate.Gain insights from business events and utilization to power innovation IBM MQ is the gold-standard for quality and reliability.It provides exactly-one,assured message delivery.Build robust highly available Build robust highly available solutions backed 24x7 solutions backed 2
68、4x7 Technical SupportTechnical SupportIBM MQ has always provided the highest levels of security and is the only vendor to offer true endtrue end-toto-end encryption for end encryption for data confidentiality and data confidentiality and message integritymessage integrity38IBM MQ is built for change
69、IBM TechXchange|2024 IBM CorporationIt connects applications dynamically,securely,and reliably,enabling businesses to build loosely coupled message and event-driven applications at scale IBM MQ brings insights into business events and empowers teams to innovate and deliver outstanding customer exper
70、iencesConnect anything,anywhereConnect anything,anywhereReduce Cost and RiskReduce Cost and RiskFacilitate changeFacilitate changeProtect DataProtect Data#IBMTechXchange39Working with IBM MQIBM TechXchange|2024 IBM Corporation#IBMTechXchange40Operational IntegrationIBM TechXchange|2024 IBM Corporati
71、on#IBMTechXchange41MQ AnsibleIBM TechXchange|2024 IBM Corporationibm.biz/mq-ansibleAsyncAPI Bindings19 bindings delivered in totalMix of API and protocol standardsBindings are open-community and open-source,often delivered by the AsyncAPI community user base.Capability complements parent spec.As suc
72、h,bindings evolve towards complete75 Forks of the repoIBM TechXchange|2024 IBM Corporation#IBMTechXchangeDocumentation and discovery with AsyncAPIDeveloper building a new web app that needs access to the order backend system to complete a purchase.Maintains the MQ estate and provides access to MQ re
73、sources such as queues and topics to developers.Maintains the backend order system which uses an MQ queue as the input.43IBM TechXchange|2024 IBM CorporationAndreApp DeveloperShavonMQ AdministratorCallumBackend DeveloperWhere do I send the order?Who do I ask for permissions?What is the data format?C
74、an I test out prior to production?An MQ Queue?Am I allowed to add Andre?Ive no idea of the data format!Yes,but are you are allowed?Ask the MQ teamAsk the MQ team to add youLet me find you a sampleSure use our test systemIBM MQ BindingIBM TechXchange|2024 IBM Corporation#IBMTechXchange45Developer Exp
75、erienceIBM TechXchange|2024 IBM CorporationSupporting our developers from initial discovery to productionBeing where our developers areibm.biz/learn-mq#IBMTechXchange46DemoIBM TechXchange|2024 IBM Corporation#IBMTechXchange47IBM TechXchange|2024 IBM CorporationSubmit OrdersSubmit OrdersService 1Serv
76、ice 1WorkerQueuecontainercontainercontainercontainercontainercontainerMQoCMQoCIBM Code EngineIBM Code EngineJavaJavaGoGoGoGoGoGoMonitorsibm.biz/mq-code-engine#IBMTechXchange48IBM TechXchange|2024 IBM Corporationibm.biz/mq-badgeibm.biz/learn-mqibm.biz/mq-playlistibm.biz/mq-playlist-advanced#IBMTechXc
77、hange50BackupIBM TechXchange|2024 IBM Corporation#IBMTechXchange51Steaming Queues2314Message producer puts messages to queue Q1Q1Q1Q1 has a local streaming queue Q2Q2 defined,so the queue manager delivers a copy of the message to Q1Q1 and Q2Q2Message producer puts messages to queue Q1Q1IBM TechXchan
78、ge|2024 IBM CorporationStreaming enable a copy of a message delivered to one queue to be delivered to a second queue.The configuration requires no existing code changes to support new capabilities such as,audit logging,message reply,migration rollout and diagnostics.Streaming queues are also useful
79、as data source into a Kafka connector instance.Q1 has a remote streaming queue defined,so the queue manager delivers a copy of the message to Q1QM2 Q1QM2 and Q2QM3Q2QM3QM1Q1(SQ=Q2)QM2Q2MessageProducerMessageProducerQM3Q1(SQ=Q2QM3)Q21234RESTRESTJMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0AMQPAMQP
80、point-to-point.NET.NETMQIMQI#IBMTechXchange52Delivery Delay2314Message producer sets Delivery Delay and puts to target destinationQueue manager holds message on SYSTEM.DDELAY.LOCAL.QUEUEMessage delivery to target queue is delayedOnce delay time exceeded,queue manager delivers message to target desti
81、nation,and is made available to consumersIBM TechXchange|2024 IBM CorporationQM1SYSTEM.DDELAY.LOCAL.QUEUEMessageProducerTarget Destination1234Sometimes it useful to delay the onward processing of messages to schedule workload or to pre-approve a future action for example,approve processing of paymen
82、t for a fixed time in the future based on contractual obligation.JMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0#IBMTechXchange53Message Listeners2314Message consumer connects and registers a message lister against a queue Producer makes message available on the queueMessage broker makes message av
83、ailable to consumer via registered listenerIBM TechXchange|2024 IBM CorporationLike a publish-subscribe topic subscriber,message listeners provide a convenient way for consumers to register interest in a message destination and for messages to be delivered via a call back as they become available.An
84、 example of this pattern is Message Driven Bean(MDBMDB)solution deployments using point-to-point or publish-subscribe style transports.Message consumer completes processing of message1234QMQ1MessageConsumerMessageProducerJMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0AMQPAMQPpoint-to-pointpub-sub.N
85、ET.NETMQIMQI#IBMTechXchange54Backout Queues231+Message consumed from input destinationConsumer processes the message observing properties of the message and queue to identify poisonpoison-messagesmessagesQueue manager or application send messages requiring remediation to a backout queueIBM TechXchan
86、ge|2024 IBM CorporationBackout queues provide a mechanism to ensure messaging resources are not overwhelmed by dealing with messages that cannot be processed.Where an application fails to process a message,processing is typically retried to cope with transient infrastructure issues e.g.,a service no
87、t available.Backout queuing strategies avoid tight processing loops.JMS and Jakarta Messaging frameworks provide greater degrees of broker automationBackoutQueueMessageConsumer123JMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0AMQPAMQPpoint-to-pointpub-sub.NET.NETMQIMQI#IBMTechXchange55Dead Letter Q
88、ueues2314Message produced into messaging networkMessage acknowledgement receivedQueue manager encounters problem in deliver to remote queue due to error such as queue now fullIBM TechXchange|2024 IBM CorporationDead letter queues are the delivery of last resort in messaging networks where the messag
89、e has been accepted from the client application,but final delivery encountered an error.For example,the target queue might have become full while the message was in transit.IBM MQ adds a header to messages that are delivered to the dead letter queue containing a reason code.Queue manager adds dead l
90、etter header containing reason code and delivers the message to the dead letter queue123QM1Q1QM2QM2Q1MessageProducerXDLQDLHeader4maxJMSJMSJakarta Jakarta Messaging 3.0Messaging 3.0AMQPAMQPpoint-to-pointpub-sub.NET.NETMQIMQI#IBMTechXchange56Dead Letter Handlers231Message is read from the queue manage
91、rs dead letter queueThe dead letter handler includes logic to inspect the message in context with the failure modeAn onward processing strategy is identified,and the message is either reprocessed or managed as an exception.IBM TechXchange|2024 IBM CorporationJMSJMSJakarta Jakarta Messaging 3.0Messag
92、ing 3.0Dead letter handlers are special consuming applications designed to process messages from a dead letter queue,read the the dead letter header information,and determine suitable remedial actions.Strategies might include escalation to a solution support team.123QMDLQDead Letter HandlerDLHeaderAMQPAMQPpoint-to-pointpub-sub.NET.NETMQIMQI