Replies: 5 comments 13 replies
-
From @alan994 I tired something like that in my example project and I'm getting error Consumer already exists . I assume this error is because my ConsumerSyncA and ConsumerSyncB have same durable name natsconsumersync1 , but in your test this is the same. ConsumerSyncA: ConsumerSync B: Publisher: |
Beta Was this translation helpful? Give feedback.
-
@alan994 So there is a bug in the subscribe code, but I'm also pretty sure that your consumer may not have the deliver group. I put together an example that is working now, that creates the consumer ahead of time, then uses that durable consumer in a queue fashion. |
Beta Was this translation helpful? Give feedback.
-
Hello, I have a question related to this. We are porting from the legacy STAN implementation/libraries. I currently have a set of agents that scale on demand subscribing to a given queue group. The question I have is related to the MaxAckPending residing on the consumer. Ideally what I am looking for is the MaxAckPending to be a product of the subscription (or some equivalent paradigm) so delivery stops to a given subscription in a queue group at that time. If I set the MaxAckPending to 5, lets say, and have 2 agents subscribed, I would like to have 10 messages in flight (5 to each agent). I am looking at FlowControl now as a possible solution, but I cannot glean from the documentation if this will work as I intend. Please find my relevant configuration below
|
Beta Was this translation helpful? Give feedback.
-
Ok, I think your analysis about MaxAckPending is correct and your workaround does seem viable. What do you do when a consumer exits? Regarding flow control and heartbeats, these are all handled internally for you, you will never see them. Also I don't think this is a client issue as all clients will have the same exact problem because the queuing just pushes everything. You might find some control with rate limit, but that's a byte limit, not a message limit and again, across queues not sure how it will work in reality. You might want to propose a server feature. That repo is https://github.com/nats-io/nats-server . Sorry it just doesn't seem like we support exactly what you are trying to accomplish. |
Beta Was this translation helpful? Give feedback.
-
1 consumer == 1 subject ? |
Beta Was this translation helpful? Give feedback.
-
Here is an example of a Push based Queue
https://github.com/nats-io/nats.net/blob/master/src/Tests/IntegrationTests/TestJetStreamPushSyncQueue.cs
Beta Was this translation helpful? Give feedback.
All reactions