This demo shows the current multi-client replay behaviour:
- each replay client has its own replay cursor
- one stalled replay client does not stop another replay client from receiving records
replay.client-timeout-msdisconnects the stalled client instead of letting it sit forever
From the project root:
make demoFrom this directory:
./run-appliance.shThis starts:
- appliance-side
ljd - a steady message stream
The replay listener is configured with:
replay.max-clients: 4
replay.client-timeout-ms: 3000From this directory:
./run-normal-consumer.shThis starts:
- the collector
- a normal replay client that forwards records into the collector
You should immediately see MULTI 001, MULTI 002, and so on.
From this directory:
./run-stall-client.shThis client:
- connects to the replay listener
- asks for
drainmode - receives one record
- stops acknowledging it
Because the replay listener uses replay.client-timeout-ms: 3000, that stalled
client is closed after a few seconds.
While the stalled client is running:
- Terminal 2 keeps printing new
MULTImessages - Terminal 3 reports that it received one record and then stalled
- appliance-side
ljdeventually logs a replay client error caused by timeout
That is the point:
- one replay client can misbehave
- another replay client still has its own thread and its own cursor
- the stuck client does not hold the replay connection open forever
This does not prove complete production-grade client isolation.
It only demonstrates the current first layer:
- independent replay cursors
- replay client cap
- replay client timeout