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
I have a Jetstream that we add and delete messages from, on startup we want to get the count of messages in the stream as follows:
var currentCount = sub.GetConsumerInformation().CalculatedPending;
We noticed that this sometimes returns a count more than the actual messages in the stream so for example, we see it returning 1882 while the stream only contains 1867 messages, we checked the count with nats stream info <stream-name> and it had indeed only 1867.
Also, we check for the last message with msg.MetaData.NumPending == 0 but we observed it having it set to 15 when in indeed it was the last message on the stream as per the cli nats sub <subject-name> --last-per-subject.
Setting the ackpolicy to .WithAckPolicy(AckPolicy.None) makes it return the correct count for some reason.
Expected behavior
The returned pending messages count is consistent with the message count in the stream.
Server and client version
Server version: 2.9.16
Client version (c# client): 1.0.4
Host environment
No response
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered:
You can look through the changelog to see, it's not worth diagnosing bugs on such old versions at this point and so I wouldn't be certain which of the many fixes would impact you.
Observed behavior
I have a Jetstream that we add and delete messages from, on startup we want to get the count of messages in the stream as follows:
We noticed that this sometimes returns a count more than the actual messages in the stream so for example, we see it returning
1882
while the stream only contains1867
messages, we checked the count withnats stream info <stream-name>
and it had indeed only1867
.Also, we check for the last message with
msg.MetaData.NumPending == 0
but we observed it having it set to 15 when in indeed it was the last message on the stream as per the clinats sub <subject-name> --last-per-subject
.Setting the ackpolicy to
.WithAckPolicy(AckPolicy.None)
makes it return the correct count for some reason.Expected behavior
The returned pending messages count is consistent with the message count in the stream.
Server and client version
Server version: 2.9.16
Client version (c# client): 1.0.4
Host environment
No response
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: