This page looks best with JavaScript enabled

 ·  ☕ 1 min read

    Micro Batching and Real Time Streaming (RTS)

    Micro Batching and Real Time Streaming are the two primary methods in which messages are consumed and processed. At a high level micro batching and RTS seem very similar but there are several key differences to be aware of when designing consumers.

    A micro batch is a collection of messages received when the consumer polls the event bus for new messages, each message in the batch is processed. It is common for the poll process to have a timeout window and maximum message count set, messages not received during the poll will wait until the next one.

    RTS is used for time sensitive use cases where messages must be received and processed within a certain time-frame (measured in milliseconds). RTS applications leverage multiple threads to individually received and process messages in the lowest possible time frame. High frequency day traders would need RTS for their trades.

    Micro batching is suitable when the time between a message being produced and processed is not a concern (within reason). For example when a product is sold, the inventory could needs to be updated, but it does not matter if the update takes a couple of minutes.

    Share on

    Brett Johnson
    WRITTEN BY
    Brett Johnson
    Automator of things