Changes for page Messaging Synchronous
Last modified by Danniar Firdausy on 2024/09/16 13:37
From version 13.14
edited by Danniar Firdausy
on 2024/09/16 13:37
on 2024/09/16 13:37
Change comment:
There is no comment for this version
To version 4.1
edited by Erik Bakker
on 2022/08/23 10:02
on 2022/08/23 10:02
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. dfirdausy1 +XWiki.ebakker - Default language
-
... ... @@ -1,1 +1,0 @@ 1 -en - Content
-
... ... @@ -1,10 +1,13 @@ 1 1 {{container}} 2 2 {{container layoutStyle="columns"}} 3 3 ((( 4 -In this microlearning, we will in troduceyouto the basics of the synchronous messaging patternwithin the eMagiz platform.You will gain an understanding of how this pattern operates, its key characteristics, and when it may or may not be the best choice for your integrations.4 +In this microlearning, we will explain the basics of the synchronous messaging pattern. 5 5 6 6 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 7 7 8 +* Last update: August 5th, 2021 9 +* Required reading time: 5 minutes 10 + 8 8 == 1. Prerequisites == 9 9 10 10 * Intermediate knowledge of the eMagiz platform ... ... @@ -12,7 +12,7 @@ 12 12 == 2. Key concepts == 13 13 14 14 This microlearning centers around the synchronous messaging pattern in eMagiz. 15 - *By synchronous we mean:The process that processes data and subsequently informs the caller what the status is.18 +By synchronous, we mean The process that processes data and subsequently informs the caller what the status is. 16 16 17 17 Key characteristics of synchronous messaging are: 18 18 ... ... @@ -21,66 +21,49 @@ 21 21 * Messages have a time limit. The response needs to be back within 25 seconds (eMagiz default) 22 22 * Uses a request-response structure that talks to one system at a time 23 23 24 -{{info}}In case you want to learn more about asynchronous messaging, please check out this [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Messaging.crashcourse-messaging-messaging-asynchronous||target="blank"]].{{/info}} 25 - 26 26 == 3. Messaging Synchronous == 27 27 28 -Synchronous messaging is the less used, the less advised option when implementing a messaging integration via eMagiz. With this approach, the sendingparty supplies the data to eMagiz via a push mechanism.eMagiz,in turn, places the dataon a queue(in most cases anonramp queue). The subsequentprocess (theonramp)will process the message and will put the message on the next queue (the synchronousrouting). That process will route eachmessage tothe correctofframp. This process continues untilthe message eMagiz deliversto the external system. At that point, eMagiz will wait for a response. If that response is received, the message will travel back tothe starting point to deliver the reaction to the caller. Ifsomethinggoes wrong, for example, a timeout, the error messageis also givenback to the caller, and eMagiz will log the exception. If you want to learn more on that, please check out this [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Understanding Error Handling.intermediate-understanding-error-handling-in-emagiz-messaging-synchronous||target="blank"]].29 +Synchronous messaging is the less used, the less advised option when implementing a messaging integration via eMagiz. In case you want to learn more about asynchronous messaging, please check out this [microlearning](crashcourse-messaging-messaging-asynchronous.md) 29 29 30 - [[image:Main.Images.Microlearning.WebHome@intermediate-key-concepts-emagiz-messaging-messaging-synchronous--concept.png]]31 +Key characteristics of synchronous messaging are: 31 31 32 -Note that this means that when one message is currently being processed, all other messages have to patiently wait until the message is processed as we speak delivered back to the caller. As there is a time constraint on the messages (25 seconds as eMagiz default), you can see why this option is less suitable within the messaging engine. The most pain is felt in the routing. Just as with asynchronous routing, the synchronous routing processes all synchronous messages that pass through your messaging engine. As a result, this means that when one synchronous process is busy, it can even hold up other synchronous processes. The API Gateway pattern is a more suitable alternative for handling the request-response pattern via an integration platform such as eMagiz. If you want to learn more on that, please check out the [[crash course>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]]. 33 +- Blocking. The sender initiates the process and waits for a response before continuing with the following message 34 +- Systems depend on the responses of other systems for their function 35 +- Messages have a time limit. The response needs to be back within 25 seconds (eMagiz default) 36 +- Uses a request-response structure that talks to one system at a time 33 33 34 - Anotheraspectfthe synchronous messagingpatterntoconsideristhatthe systemfromwhichyouwanttoretrievedata(orpush datato)basedon therequestmadeby thecallerneeds tobe online.Ifit isnotonline, eMagiz won't receivea response,and thecallercannotcontinue theirwork.Thisfactcreatesadependencybetweensystemsthat couldreducetheperceivedreliabilityof yourintegrationsolution.With asynchronous messaging,youcould takesurestomitigatetheseks,suchas aretry mechanism.38 +With this method, the sending party supplies the data to eMagiz via a push mechanism. eMagiz, in turn, places the data on a queue (in most cases an onramp queue). The subsequent process (the onramp) will process the message and will put the message on the next queue (the synchronous routing). That process will route each message to the correct offramp. This process continues until the message eMagiz delivers to the external system. At that point, eMagiz will wait for a response. If that response is received, the message will travel back to the starting point to deliver the reaction to the caller. If something goes wrong, for example, a timeout, the error message is also given back to the caller, and eMagiz will log the exception. If you want to learn more on that, please check out this [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Understanding Error Handling.intermediate-understanding-error-handling-in-emagiz-messaging-synchronous.WebHome||target="blank"]] 35 35 36 - A thirdaspect to consider is whether you cansetanericpoint of entry through which all clients cancommunicate via eMagiz toany othersystems. In thosecases, you couldlookattheAPI Gatewaysolutionas an alternative to synchronousmessaging, as it comeswithseveral benefits. More onthe basics of the API Gatewaycanbe found in this [[crashcourse>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash CourseAPI Gateway.WebHome||target="blank"]].40 +[[image:Main.Images.Microlearning.WebHome@intermediate-key-concepts-emagiz-messaging-messaging-synchronous--concept.png]] 37 37 38 - ===3.1Practical use case ===42 +Note that this means that when one message is currently being processed, all other messages have to patiently wait until the message is processed as we speak delivered back to the caller. As there is a time constraint on the messages (25 seconds as eMagiz default), you can see why this option is less suitable within the messaging engine. The most pain is felt in the routing. Just as with asynchronous routing, the synchronous routing processes all synchronous messages that pass through your messaging engine. As a result, this means that when one synchronous process is busy, it can even hold up other synchronous processes. The API Gateway pattern is a more suitable alternative for handling the request-response pattern via an integration platform such as eMagiz. If you want to learn more on that, please check out the [[crashcourse>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]]. 39 39 40 -A practicalusecase inwhich you wouldmost likelywant to handle your integration synchronouslyis thefollowinguse case:44 +Another aspect of the synchronous messaging pattern to consider is that the system from which you want to retrieve data (or push data to) based on the request made by the caller needs to be online. If it is not online, eMagiz won't receive a response, and the caller cannot continue their work. This fact creates a dependency between systems that could reduce the perceived reliability of your integration solution. With asynchronous messaging, you could take measures to mitigate these risks, such as a retry mechanism. 41 41 42 - Imagineyou want to ordersomethingat awebshop. After youhaveselectedtheproduct(s),you wanttoopenhe paymentprocessto pay.Upon payment, you alsoneedtosupplytherelevantaddressinformation,sowebshop knowswhereto deliver the product. Indoingso, you oftenseethat whenyouprovideyour postalcode (andhousenumber),thesystemwill automaticallyfill in theemainderofyouraddressinformation.Thisfunctionalityis therefortwo reasons.Yourconvenienceand becausethewebshop needs thisinformationto deliver theproductyou paid for correctly. If theebshopdoesnotknow wheretoelivertheproduct, the webshopcannotcomplete theorderprocess.Asaresult, theshop needsto send outaquestthat will promptlybe followed byaresponse (a synchronous call).46 +A third aspect to consider is whether you can set a generic point of entry through which all clients can communicate via eMagiz to many other systems. In those cases, you could look at the API Gateway solution as an alternative to synchronous messaging, as it comes with several benefits. More on the basics of the API Gateway can be found in this [[crashcourse>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]]. 43 43 44 - Eveninthiscenario, most web shopsgive the user the optiontomanually fill in theremainder oftheinformation as they know that even when the call fails, the user still needs a way to continue. So in a sense, the webshop has taken the responsibility of handling success and failure responses.48 +== 4. Assignment == 45 45 46 - ===3.2 AsynchronousvsSynchronous ===50 +No assignment accompanies this microlearning. 47 47 48 - Thedecisionto handlean integration process in a specific manner depends on various relevant business and technical checks and balances that should be answered before choosing which integration pattern to choose and then subsequentlywhich alternative method within an integration pattern to choose.If you want more information on how to decide this correctly, please check out this [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Discover your integration landscape.intermediate-discover-your-integration-landscape-determining-integration-pattern||target="blank"]].52 +== 5. Key takeaways == 49 49 50 -{{html}} 51 -<!-- 54 +* The key aspects are: 55 + * Entry is the starting point of the integration process in messaging 56 + * Queues are an internal resource of eMagiz 57 + * Outside parties are not allowed to write on eMagiz queues directly 58 + * eMagiz facilitates various connectivity methods (i.e., REST, SOAP, Database, File) 52 52 53 -== 4. Assignment == 54 54 55 -Analyze a synchronous messaging flow from entry to exit and learn what happens within this process. 56 -This assignment can be completed with the help of your (Academy) project you have created/used in the previous assignment. 57 57 58 ---> 59 -{{/html}} 62 +== 6. Suggested Additional Readings == 60 60 61 - ==4.Keytakeaways==64 +If you are interested in this topic, please boost your knowledge with the help of the internet. 62 62 63 -* Key characteristics of synchronous messaging include: 64 -** Blocking: The sender must wait for a response before proceeding with the next message. 65 -** System dependency: Systems rely on timely responses from others to function effectively. 66 -** Time constraints: Messages have a time limit (25 seconds by default in eMagiz) for receiving a response. 67 -** Request-response structure: Each request is handled by one system at a time. 68 -* The API Gateway pattern is often a better alternative when handling synchronous communication, as it offers more flexibility and mitigates some of the challenges associated with synchronous messaging. 66 +== 7. Silent demonstration video == 69 69 70 - ==5.SuggestedAdditionalReadings==68 +As this is a more theoretical microlearning, we have no video for this. 71 71 72 -If you are interested in this topic and want more information on it please read the help text provided by eMagiz and read the following links: 73 - 74 -* [[Crash Course (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.WebHome||target="blank"]] 75 -** [[Crash Course Messaging (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Messaging.WebHome||target="blank"]] 76 -*** [[Messaging Asynchronous (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Messaging.crashcourse-messaging-messaging-asynchronous||target="blank"]] 77 -** [[Crash Course API Gateway (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.WebHome||target="blank"]] 78 -* [[Intermediate Level (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.WebHome||target="blank"]] 79 -** [[Discover your integration landscape (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Discover your integration landscape.WebHome||target="blank"]] 80 -*** [[Determining Integration Pattern (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Discover your integration landscape.intermediate-discover-your-integration-landscape-determining-integration-pattern||target="blank"]] 81 -** [[Understanding Error Handling (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Understanding Error Handling.WebHome||target="blank"]] 82 -*** [[Error Handling in Messaging Synchronous (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Understanding Error Handling.intermediate-understanding-error-handling-in-emagiz-messaging-synchronous||target="blank"]] 83 -* [[Messaging Synchronous (Search Results)>>url:https://docs.emagiz.com/bin/view/Main/Search?sort=score&sortOrder=desc&highlight=true&facet=true&r=1&f_space_facet=0%2FMain.&l_space_facet=10&f_type=DOCUMENT&f_locale=en&f_locale=&f_locale=en&text=%22messaging+synchronous%22||target="blank"]] 84 84 ))) 85 85 86 86 ((({{toc/}}))){{/container}}