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
For the use case where a stream consumer wants to retrieve all events using a subject filter, it should be documented that the developer should not use JetStreamSubscription#getPendingMessageCount(), and should use JetStreamSubscription#getConsumerInfo().getCalculatedPending(). This was tribally known prior to my filing this issue, but needs to be called out explicitly in the documentation. Further, I think that the javadoc of these properties should be beefed up so that those that are looking at the source understand the differences.
scottf
changed the title
Document that, when using an ordered push consumer, devs should use JetStreamSubscription#getConsumerInfo().getCalculatedPending(), not JetStreamSubscription#getPendingMessageCount()
Doc improvement getCalculatedPending() versus getPendingMessageCount()
Sep 19, 2023
Overview
Document the proper use, when using an [ordered] push consumer, of
versus
Description
For the use case where a stream consumer wants to retrieve all events using a subject filter, it should be documented that the developer should not use
JetStreamSubscription#getPendingMessageCount()
, and should useJetStreamSubscription#getConsumerInfo().getCalculatedPending()
. This was tribally known prior to my filing this issue, but needs to be called out explicitly in the documentation. Further, I think that the javadoc of these properties should be beefed up so that those that are looking at the source understand the differences.Link to Slack discussion where this is called out: https://natsio.slack.com/archives/C055AB5M1KM/p1689197213989439?thread_ts=1689111301.307819&cid=C055AB5M1KM
The text was updated successfully, but these errors were encountered: