Last modified by Erik Bakker on 2023/09/11 13:18

Show last authors
1 {{container}}{{container layoutStyle="columns"}}(((
2 In this microlearning we'll take a moment to discuss several considerations for making the right choice between the two patterns
3
4 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]].
5
6 == 1. Prerequisites ==
7
8 * Advanced knowledge of the eMagiz platform
9 * Completed the relevant microlearnings Key Concepts Event Streaming (level crash course to intermediate)
10 * Completed the relevant microlearnings Key Concepts Messaging (level crash course to intermediate)
11
12 == 2. Key concepts ==
13
14 Please refer to the following Fundamentals to learn the key concepts of both patterns
15
16 * [[eMagiz Event Streaming>>doc:Main.eMagiz Academy.Fundamentals.fundamental-event-streaming-introduction||target="blank"]]
17 * [[eMagiz Messaging>>doc:Main.eMagiz Academy.Fundamentals.fundamental-messaging-introduction||target="blank"]]
18
19 == 3. Considerations for selecting Messaging or Event Streaming ==
20
21 The following sections are helpful to understand what things to consider in selecting the right pattern.
22
23 * **Asynchronous**
24 ** Both patterns are asynchronous in nature. In case a synchronous message is the right choice, pelase refer to the relevant microlearning that compares messaging and API gateway
25 * **Data**
26 ** Event Streaming solutions are typically used in large volumes of data whereby each message is relatively small. A typical example is an IoT data stream, but you can use Event Streaming for order, confirmations or other data collections. There is a maximum value for each message on a topic of 1Mb
27 ** Messaging can handle larger messages although 1 Mb message are the average that eMagiz considers. In case larger messages exist, Messaging would be a better option
28 * **Online vs. offline**
29 ** For Messaging, the delivering and receiving system need to be online with high availability ratio's in order to process the messages
30 ** For Event Streaming, producers and consumers can choose their own downtime and for small intervals where messages are not produces or consumed
31 * **Contract & communication**
32 ** Messaging required a fixed contract between the message definitions that are exchanged. A change of definition would result in validation issues and therefore more communication is required
33 ** Event Streaming has a more loosly character in a sense that the producer defines the message that is send and publishes it to the consumer. COnsumer can then consume the message and decide how to process the message
34 * **Technical disqualifiers**
35 ** Use Event Streaming requires the produces and the consumer to have the technical capability to produce and consume messages on a Kafka topic.
36 ** Messaging allows to receive and send messages via many more protocols such as REST, SOAP, File pickup, etc. Please note that eMagiz Messaging can also produce and consume messages from and to topics which can help to support the use of event streaming
37 * **Data Storage**
38 ** In the Messaging pattern, no data is stored and the data is in full transit
39 ** In the Event Streaming pattern, data is persisted for a short time in a storage location. The data is still considered to be in transit, but making choice where data is persisted too often with minimal change to the message could impact data storage. eMagiz has licensed limits for data storage in Event Streaming.
40
41 == 4. Key takeaways ==
42
43 * There are a set of considerations to make decisions for event streaming vs. messaging
44 * Make sure to read the eMagiz Fundamentals properly before taking this section into account in your project
45
46 == 5. Suggested Additional Readings ==
47
48 Take a moment to read the following [[Usecase>>doc:Main.eMagiz Academy.Use Cases.Pattern Determination.WebHome||target="blank"]]
49 )))((({{toc/}}))){{/container}}{{/container}}