Streamer trait defines the common interface of streaming clients.
Consult https://kafka.apache.org/documentation/#intro_concepts_and_terms for a gentle introduction.
SeaStreamer Redis aims to provide a Kafka-like client experience, but there are some fundamental differences between Redis and Kafka:
- In Redis sequence numbers are not contiguous
- In Redis messages are dispatched to consumers among group members in a first-ask-first-served manner, which leads to the next point
- In Redis ACK has to be done per message
The Stdio backend spawn two dedicated threads to handle stdin and stdout respectively. The host part of the Streamer URI is always empty, i.e. in
stdio://, the host is
Set the default network timeout for all connections.
Establish a connection to the streaming server. The
Streamer implementation does not have to maintain an open connection to the server.
Disconnect from the streaming server. The intention is to flush remaining messages and exit gracefully. You have to
await this operation until it completes. Once you called this method, all producers and consumers created will become unusable.
Create a producer that streams to the specified stream.
Create a producer that can stream to any stream.
Create a consumer subscribing to the specified streams.