close c
Signature: c:Consumer -> Async<unit>
|
Closes the consumer and leaves the consumer group.
This causes all underlying streams to complete.
|
commitOffsets c offsets
Signature: c:Consumer -> offsets:(Partition * Offset) [] -> Async<unit>
|
Explicitly commits offsets to a consumer group.
Note that consumers only fetch these offsets when first joining a group or when rejoining.
|
commitOffsetsToTime c time
Signature: c:Consumer -> time:Time -> Async<unit>
|
Explicitly commits offsets to a consumer group, to a specific offset time.
Note that consumers only fetch these offsets when first joining a group or when rejoining.
|
configuration c
Signature: c:Consumer -> ConsumerConfig
|
Gets the configuration for the consumer.
|
consume c handler
Signature: c:Consumer -> handler:(ConsumerState -> ConsumerMessageSet -> Async<unit>) -> Async<unit>
|
Starts consumption using the specified handler.
The handler will be invoked in parallel across topic/partitions, but sequentially within a topic/partition.
The handler accepts the topic, partition, message set and an async computation which commits offsets corresponding to the message set.
|
consumePeriodicCommit (...)
Signature: c:Consumer -> commitInterval:TimeSpan -> handler:(ConsumerState -> ConsumerMessageSet -> Async<unit>) -> Async<unit>
|
Starts consumption using the specified handler.
The handler will be invoked in parallel across topic/partitions, but sequentially within a topic/partition.
The offsets will be enqueued to be committed after the handler completes, and the commits will be invoked at
the specified interval.
|
create conn cfg
Signature: conn:KafkaConn -> cfg:ConsumerConfig -> Consumer
|
Creates a consumer.
|
createAsync conn cfg
Signature: conn:KafkaConn -> cfg:ConsumerConfig -> Async<Consumer>
|
Creates a participant in the consumer groups protocol and joins the group.
|
fetchOffsets conn groupId topics
Signature: conn:KafkaConn -> groupId:GroupId -> topics:(TopicName * Partition []) [] -> Async<(TopicName * (Partition * Offset) []) []>
|
Returns the committed partition-offset pairs for the specified topic partitions in a consumer group.
Passing an empty array returns offset information for all topics and partitions.
Passing a topic and an empty array of partitions returns all partitions for that topic.
|
generations c
Signature: c:Consumer -> AsyncSeq<ConsumerState * (Partition * AsyncSeq<ConsumerMessageSet>) []>
|
Returns an async sequence corresponding to generations, where each generation
is paired with the set of assigned fetch streams.
|
periodicOffsetCommitter c commitInterval
Signature: c:Consumer -> commitInterval:TimeSpan -> Async<PeriodicCommitQueue>
|
Creates a period offset committer, which commits at the specified interval (even if no new offsets are enqueued).
Commits the current offsets assigned to the consumer upon creation.
Returns a pair consisting of the commit queue and a process which commits offsets and reacts to rebalancing.
|
state c
Signature: c:Consumer -> Async<ConsumerState>
|
Returns the current consumer state.
|
states c
Signature: c:Consumer -> AsyncSeq<ConsumerState>
|
Returns the stream of consumer states as of the invocation, including the current state.
|
stream c
Signature: c:Consumer -> AsyncSeq<ConsumerState * ConsumerMessageSet>
|
Returns a stream of message sets across all partitions assigned to the consumer.
|
streamRange c offsetRange
Signature: c:Consumer -> offsetRange:Map<Partition,(Offset * Offset)> -> Async<ConsumerMessageSet []>
|
Starts consumption from the start offset in the given range.
Will stop consuming for each partition once it reaches the max boundary offset.
Will stop and return the messages WITHIN the range if it overconsumes.
|