Hello,
I could use a quick review from someone who knows genstage well.
I would like to verify the size of the buffer and make sure my pipeline is setup right to handle back pressure. For testing, I’d like push a bunch of events in, make sure consumers are slow (using a sleep or something) and watch events buffer in the producer and hit a limit.
In short, I’d like to trigger back pressure so I can slow an incoming stream of events arriving via call/sync_notify and/or cast/async_notify. If the producer buffer is full, I would like to be able to return (above the producer) some error code so that the stream can know a node has reached overload.
My questions are:
- What ensures that events are pushed to the buffer?
- How can the buffer be monitored?
For monitoring the buffer, I am looking at trying to get the producer_info. Is this the right approach?
What should msg be? How do I invoke this function at runtime from within say… iex?
I’m trying to pass {:"$info", “some appropriate message”} to GenServer.call but getting a FunctionClauseError.
Thanks!
– Randy