Considerations for Event Streaming or Messaging

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

In this microlearning we'll take a moment to discuss several considerations for making the right choice between the two patterns

Should you have any questions, please get in touch with academy@emagiz.com.

1. Prerequisites

  • Advanced knowledge of the eMagiz platform
  • Completed the relevant microlearnings Key Concepts Event Streaming (level crash course to intermediate)
  • Completed the relevant microlearnings Key Concepts Messaging (level crash course to intermediate)

2. Key concepts

Please refer to the following Fundamentals to learn the key concepts of both patterns

3. Considerations for selecting Messaging or Event Streaming

The following sections are helpful to understand what things to consider in selecting the right pattern.

  • Asynchronous
    • 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
  • Data
    • 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
    • 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
  • Online vs. offline
    • For Messaging, the delivering and receiving system need to be online with high availability ratio's in order to process the messages
    • For Event Streaming, producers and consumers can choose their own downtime and for small intervals where messages are not produces or consumed
  • Contract & communication
    • 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
    • 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
  • Technical disqualifiers
    • Use Event Streaming requires the produces and the consumer to have the technical capability to produce and consume messages on a Kafka topic.
    • 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
  • Data Storage
    • In the Messaging pattern, no data is stored and the data is in full transit
    • 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.

4. Key takeaways

  • There are a set of considerations to make decisions for event streaming vs. messaging
  • Make sure to read the eMagiz Fundamentals properly before taking this section into account in your project

5. Suggested Additional Readings

Take a moment to read the following Usecase