You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to use the bulk subscribe feature with the jetstream pubsub component, but I'm experiencing issues.
Expected Behavior
When using the bulk subscribe feature, I expect:
Receiving multiple messages in one request in my app
The ability to acknowledge or retry each message independently.
Actual Behavior
Right out of the box, always only one message is delivered in one request to the app endpoint, no matter how many are waiting to be delivered. I've looked at the component implementation and found this Concurrency config (this is not in the docs for some reason). When I set this config to parallel, the bulk subscription endpoint in my app starts receiving multiple messages in the same request, but unfortunately, using this setting seems to break the ACK mechanism, Dapr starts logging errors like: level=error msg="Error while sending ACK for JetStream message transaction-events/{3 2549}: nats: message was already acknowledged"
I'm using the explicit ackPolicy. Without the parallel concurrency setting, the ack policy works as intended, but the bulk message delivery does not.
Steps to Reproduce the Problem
I'm using the dotnet SDK to subscribe to a topic:
app.MapPost("/transaction-events",
(BulkSubscribeMessage<BulkMessageModel<Event>> bulkMessages) =>
{
var responseEntries = bulkMessages.Entries
.Select(message => new BulkSubscribeAppResponseEntry(message.EntryId, BulkSubscribeAppResponseStatus.SUCCESS))
.ToList();
return new BulkSubscribeAppResponse(responseEntries);
})
.WithTopic(new()
{
PubsubName = config.Value.PubsubName,
Name = config.Value.Topic
})
.WithBulkSubscribe(new()
{
TopicName = config.Value.Topic,
MaxMessagesCount = 100,
MaxAwaitDurationMs = 10
});
Is the parallel concurrency setting supposed to be used for bulk subscriptions, and if so, is the acknowledgment issue expected behavior?
Why is the concurrency configuration undocumented for this component?
What is the correct configuration to achieve bulk delivery with independent acknowledgment?
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to use the bulk subscribe feature with the jetstream pubsub component, but I'm experiencing issues.
Expected Behavior
When using the bulk subscribe feature, I expect:
Actual Behavior
Right out of the box, always only one message is delivered in one request to the app endpoint, no matter how many are waiting to be delivered. I've looked at the component implementation and found this Concurrency config (this is not in the docs for some reason). When I set this config to
parallel
, the bulk subscription endpoint in my app starts receiving multiple messages in the same request, but unfortunately, using this setting seems to break the ACK mechanism, Dapr starts logging errors like:level=error msg="Error while sending ACK for JetStream message transaction-events/{3 2549}: nats: message was already acknowledged"
I'm using the
explicit
ackPolicy. Without the parallel concurrency setting, the ack policy works as intended, but the bulk message delivery does not.Steps to Reproduce the Problem
I'm using the dotnet SDK to subscribe to a topic:
my pubsub.nats component:
Observations and Questions
Is the parallel concurrency setting supposed to be used for bulk subscriptions, and if so, is the acknowledgment issue expected behavior?
Why is the concurrency configuration undocumented for this component?
What is the correct configuration to achieve bulk delivery with independent acknowledgment?
The text was updated successfully, but these errors were encountered: