Augments connection to broker to FetchRequest/FetchResponse pattern.
Augments connection to broker to FetchRequest/FetchResponse pattern.
Apart of supplying fetch fith proper details, this echoes original request with every fetch
Connection to broker
protocol version
Id of client
Address of broker.
Queries all supplied seeds for first leader and then returns that leader.
Queries all supplied seeds for first leader and then returns that leader. Returns None if no seed replied with leader for that partition
A function that requests signle metadata
A seed of brokers
Id of topic
Id of partition
Creates discrete signal of leaders that is queried from periodical query of metadata from brokers.
Creates discrete signal of leaders that is queried from periodical query of metadata from brokers. This will query supplied seeds in order given and then with first seed that succeeds this will compile map of metadata that is emitted.
While this stream is consumed, this will keep connection with very first broker that have answered this.
If there is no broker available to server metadata request, this will fail as NoBrokerAvailable
If the broker from which metadata are queried will fail, this will try next broker in supplied seed.
connection to create against the given broker
Seed of ensemble to use to query metadata from
Delay to refresh new metadata from last known good broker
If nonempty, filters topic for which the metadata are queried
Because result of fetch can retrieve messages in compressed and nested forms, This decomposes result to simple vector by traversing through the nested message results.
Because result of fetch can retrieve messages in compressed and nested forms, This decomposes result to simple vector by traversing through the nested message results.
Result from teh fetch
Creates connection that allows to submit offset Requests.
Creates a client and F that cleans up lients resources.
Creates a client and F that cleans up lients resources.
Initial kafka clients to connect to
A function fo fetch metadata from client specified provided address and signal of state.
Produces a publisher that for every publishes partition-topic will spawn PartitionPublishConnection
.
Produces a publisher that for every publishes partition-topic will spawn PartitionPublishConnection
.
That connection is handling then all publish requests for given partition.
Connections are cached are re-used on next publish.
Function to create single publish connection to given partition.
Creates connection that allows to submit offset Requests.
With every leader for each topic and partition active this keeps connection open.
With every leader for each topic and partition active this keeps connection open. Connection is open once the topic and partition will get first produce request to serve.
Function handling connection to Kafka Broker
Protocol
Id of the client
Returns a leader for supplied topic and partition
Wait that much time to retry for new leader if leader is not known
Id of the topic
Id of the partition
Queries offsets for given topic and partition.
Queries offsets for given topic and partition. Returns offset of first message kept (head) and offset of next message that will arrive to topic. When numbers are equal, then the topic does not include any messages at all.
Queries leader for the partition supplied
A function to create connection to broker to send // receive OffsetRequests
Id of the topic
Id of the partition
Request // reply communication to broker.
Request // reply communication to broker. This sends one message I
and expect one result O
Subscribes to given partition and topic starting offet supplied.
Subscribes to given partition and topic starting offet supplied. Each subscription creates single connection to isr.
Id of the topic
Partition id
Offset from where to start (including this one). -1 designated start with very first message published (tail)
Function to query for available leader
Queries range of offset kept for given topic. First is head (oldest message offset) second is tail (offset of the message not yet in topic)