Skip to content

single active consumer is not consuming messages #412

Closed Answered by Gsantomaggio
blendereru asked this question in Q&A
Discussion options

You must be logged in to vote

@blendereru the API streamSystem.QueryOffset could raise an exception if the offset does not exist.
( maybe it is time to implement #370 )

You need to store and offset before querying it. See await consumer.StoreOffset(context.Offset).ConfigureAwait(false);

Here is a working example:

 var streamSystem = await StreamSystem.Create(new StreamSystemConfig()).ConfigureAwait(false);
        var consumer = await Consumer.Create(new ConsumerConfig(streamSystem, "my-sac-stream")
        {
            Reference = "sac_consumer",
            OffsetSpec = new OffsetTypeFirst(),
            IsSingleActiveConsumer = true,
            MessageHandler = async (_, consumer, context, message) =>
            {

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@blendereru
Comment options

@Gsantomaggio
Comment options

Answer selected by blendereru
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants