Hi all, I’m a bit confused by the following gen_stage
explanation:
@min_demand 1
@max_demand 4
- A Consumer initially asks for 4 events
- Receives only 2
- Awaits for 1 more (and while it waits for this event it does nothing)
- Receives the required 1 event
- Starts to handle those 3 events
- Asks for more events then
So if you have a requirement to handle an event immediately this could be a surprise for you that a Consumer doesn’t serve events when they come, but awaits for more to satisfy this formula.
– from https://medium.com/@andreichernykh/elixir-a-few-things-about-genstage-id-wish-to-knew-some-time-ago-b826ca7d48ba
As from my experience, Awaits for 1 more
is not the case. The consumer is immediately fired up with 2 events to process.
Am I wrong or the event batching is no longer the case, and events processed ASAP as they come?