Changes for page Messaging Synchronous
Last modified by Danniar Firdausy on 2024/09/16 13:37
From version 13.3
edited by Danniar Firdausy
on 2024/09/03 08:45
on 2024/09/03 08:45
Change comment:
There is no comment for this version
Summary
-
Page properties (5 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - MessagingSynchronous1 +intermediate-key-concepts-emagiz-messaging-entry-not-a-queue - Parent
-
... ... @@ -1,1 +1,1 @@ 1 - Main.eMagiz Academy.Microlearnings.Intermediate Level.Key concepts eMagiz Messaging.WebHome1 +WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. dfirdausy1 +XWiki.marijn - Default language
-
... ... @@ -1,1 +1,0 @@ 1 -en - Content
-
... ... @@ -1,86 +1,93 @@ 1 -{{container}} 2 -{{container layoutStyle="columns"}} 3 -((( 4 -In this microlearning, we will explain the basics of the synchronous messaging pattern. 1 +{{html wiki="true"}} 2 +<div class="ez-academy"> 3 + <div class="ez-academy_body"> 5 5 6 - Shouldyou haveany questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]].5 +<div class="doc"> 7 7 8 -== 1. Prerequisites == 9 9 10 -* Intermediate knowledge of the eMagiz platform 11 11 12 -= =2. Keyconcepts==9 += Entry, not a queue = 13 13 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. 11 +In this microlearning, we will explore what the function of the entry is within the message engine. Furthermore, we will explain why there is no entry queue. 16 16 17 - Keycharacteristicsof synchronousmessagingare:13 +Should you have any questions, please get in touch with academy@emagiz.com. 18 18 19 -* Blocking. The sender initiates the process and waits for a response before continuing with the following message 20 -* Systems depend on the responses of other systems for their function 21 -* Messages have a time limit. The response needs to be back within 25 seconds (eMagiz default) 22 -* Uses a request-response structure that talks to one system at a time 15 +* Last update: August 5th, 2021 16 +* Required reading time: 5 minutes 23 23 24 -== 3.Messaging Synchronous ==18 +== 1. Prerequisites == 25 25 26 - Synchronousmessaging istheless used, the less advised option when implementingamessaging integrationvia eMagiz. Incase youwant tolearn more about asynchronous messaging, pleasecheckoutthis[[microlearning>>doc:Main.eMagizAcademy.Microlearnings.Crash Course.Crash Course Messaging.crashcourse-messaging-messaging-asynchronous||target="blank"]].20 +* Intermediate knowledge of the eMagiz platform 27 27 28 -Key c haracteristicsof synchronous messagingare:22 +== 2. Key concepts == 29 29 30 -* Blocking. The sender initiates the process and waits for a response before continuing with the following message 31 -* Systems depend on the responses of other systems for their function 32 -* Messages have a time limit. The response needs to be back within 25 seconds (eMagiz default) 33 -* Uses a request-response structure that talks to one system at a time 24 +This microlearning centers on the concept of entry, not a queue. 34 34 35 -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||target="blank"]]. 26 +* The key aspects are: 27 + * Entry is the starting point of the integration process in messaging 28 + * Queues are an internal resource of eMagiz 29 + * Outside parties are not allowed to write on eMagiz queues directly 30 + * eMagiz facilitates various connectivity methods (i.e., REST, SOAP, Database, File) 36 36 37 -[[image:Main.Images.Microlearning.WebHome@intermediate-key-concepts-emagiz-messaging-messaging-synchronous--concept.png]] 38 38 39 -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"]]. 40 40 41 - Anotheraspectof the synchronous messaging pattern to consider is that the systemfrom which you want toretrievedata(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 continuetheir 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.34 +== 3. Entry, not a queue == 42 42 43 - Athird aspectto consideris whether you can setageneric pointofentrythroughwhich allclients can communicateviaeMagiztomany othersystems. Inhosecases, youcould look attheAPI Gatewaysolution asan alternativeto synchronousmessaging, asit comeswithseveral benefits. Moreon thebasicsof theAPI Gateway can be foundinthis[[crashcourse>>doc:Main.eMagizAcademy.Microlearnings.CrashCourse.Crash CourseAPI Gateway.WebHome||target="blank"]].36 +In this microlearning, we will explore what the function of the entry is within the message engine. Furthermore, we will explain why there is no entry queue. 44 44 45 -=== 3.1 Practical use case === 38 +* The key aspects are: 39 + * Entry is the starting point of the integration process in messaging 40 + * Queues are an internal resource of eMagiz 41 + * Outside parties are not allowed to write on eMagiz queues directly 42 + * eMagiz facilitates various connectivity methods (i.e., REST, SOAP, Database, File) 46 46 47 -A practicalusecase in which you wouldmost likelywant to handleyourintegration synchronouslyis thefollowing use case:44 +As you learned from the introductory course on messaging, we use a five-layer approach to handle data within the messaging engine. The first layer the data encounters is the entry. The goal of the entry is twofold. One is to establish a connection with an external system. The other is to place data on a queue. There are two ways to establish connectivity. The first method is via a pull mechanism. This pull mechanism means that eMagiz will initiate the communication to retrieve data. The second method is a push mechanism. This push mechanism means that eMagiz will patiently wait till the external system offers data to eMagiz. The push mechanism will typically be realized with the help of a hosted web service (REST or SOAP) within your eMagiz solution. 48 48 49 - Imagineyou wantto ordersomethingat a webshop. After you have selectedthe product(s),you wantto open thepaymentprocess to pay.Upon payment, you alsoneedto supply the relevant addressinformation,so the webshop knows whereto delivertheproduct. In doing so, you often seethat when you provide your postalcode (and house number), the systemwillautomatically fill intheremainderofyouraddressinformation. This functionalityistherefor tworeasons. Your convenience and becausethe webshopneedsthis informationto delivertheproductyou paidforcorrectly. If thewebshop doesnot knowwhere to deliver theproduct,the webshop cannotcompletetheorderprocess.Asult,thewebshopneedstosendout arequestthat willpromptly be followed byaresponse (a synchronouscall).46 +Since the goal of the entry is connectivity between the external system and eMagiz, you could argue that it would be easy to let them place the data on the queue. However, things are not that easy. There are several reasons why this is not a best practice: 50 50 51 -Even in this scenario, most web shops give the user the option to manually fill in the remainder of the information 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 +* This would mean that the external system directly needs to connect to the infra layer (the JMS) and will have the option to read and write on other queues as well 49 +* This would mean that the external system can only push data to eMagiz (so no polling of data) 50 +* This would mean that the external system can directly place data on a queue 51 +* This would create a tightly coupled dependency between the external system and eMagiz 52 52 53 - ===3.2AsynchronousvsSynchronous===53 +The above arguments concluded that the connectivity between eMagiz and the external system and the internal queue mechanism of eMagiz should be considered two separate things. This conclusion did raise a question on how eMagiz can guarantee message delivery. The messaging engine uses queues to ensure message delivery. But what if the first queue (the onramp queue) cannot be reached? What happens then. 54 54 55 -The de cision tohandlenintegration processinaspecificmannerdependson variousrelevantbusinessandtechnicalchecks andbalancesthatshouldbeansweredbefore choosingwhich integration pattern to choose and thensubsequentlywhichalternativemethod withinanintegrationpatternto choose. If you wantmoreinformation onhowtodecidethiscorrectly, please check out this [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.IntermediateLevel.Discover your integrationlandscape.intermediate-discover-your-integration-landscape-determining-integration-pattern||target="blank"]].55 +The H2 database is introduced to safeguard against any problems within the entry. This component is generated in every entry in eMagiz. This H2 database will temporarily store data and act as a bridge between the entry and the onramp queue. This way, eMagiz can guarantee message delivery. If you want to learn more about the function of the H2 database, please check out this [microlearning](intermediate-solution-architecture-function-of-h2-database.md). 56 56 57 +To summarize: 58 + 59 +* Entry is the starting point of the integration process in messaging 60 +* Queues are an internal resource of eMagiz 61 +* Outside parties are not allowed to write on eMagiz queues directly 62 +* eMagiz facilitates various connectivity methods (i.e., REST, SOAP, Database, File) 63 + 64 +===== Practice ===== 65 + 57 57 == 4. Assignment == 58 58 59 -Analyze a synchronous messaging flow from entry to exit and learn what happens within this process. 60 -This assignment can be completed with the help of your (Academy) project you have created/used in the previous assignment. 68 +No assignment accompanies this microlearning. 61 61 62 62 == 5. Key takeaways == 63 63 64 -* Synchronous messaging is the less used, the less advised option when implementing a messaging integration via eMagiz 65 -* Key characteristics of synchronous messaging are: 66 - ** Blocking. The sender initiates the process and waits for a response before continuing with the following message 67 - ** Systems depend on the responses of other systems for their function 68 - ** Messages have a time limit. The response needs to be back within 25 seconds (eMagiz default) 69 - ** Uses a request-response structure that talks to one system at a time 70 -* Using the API Gateway pattern can be a valid alternative when dealing with a synchronous integration demand. 72 +* The key aspects are: 73 + * Entry is the starting point of the integration process in messaging 74 + * Queues are an internal resource of eMagiz 75 + * Outside parties are not allowed to write on eMagiz queues directly 76 + * eMagiz facilitates various connectivity methods (i.e., REST, SOAP, Database, File) 71 71 78 + 79 + 72 72 == 6. Suggested Additional Readings == 73 73 74 -If you are interested in this topic a ndwantmoreinformation on it pleasereadthe helptext providedby eMagiz and readthefollowing links:82 +If you are interested in this topic, please boost your knowledge with the help of the internet. 75 75 76 -* [[Crash Course (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.WebHome||target="blank"]] 77 -** [[Crash Course Messaging (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Messaging.WebHome||target="blank"]] 78 -*** [[Messaging Asynchronous (Explanation)>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Messaging.crashcourse-messaging-messaging-asynchronous||target="blank"]] 79 -* [[Intermediate Level (Menu)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.WebHome||target="blank"]] 80 -** [[Understanding Error Handling (Navigation)>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Understanding Error Handling.WebHome||target="blank"]] 81 -*** [[Error Handling in Messaging Synchronous>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Understanding Error Handling.intermediate-understanding-error-handling-in-emagiz-messaging-synchronous||target="blank"]] 82 -* [[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"]] 83 -))) 84 +== 7. Silent demonstration video == 84 84 85 -((({{toc/}}))){{/container}} 86 -{{/container}} 86 +As this is a more theoretical microlearning, we have no video for this. 87 + 88 +</div> 89 + 90 +</div> 91 +</div> 92 + 93 +{{/html}}