Replies: 7 comments 11 replies
-
Not sure I understand the question? |
Beta Was this translation helpful? Give feedback.
-
If you want this behaviour, then you want an Interest-based stream, not Limits. Note that you can still set limits like max age, max msgs etc on an Interest-based stream. |
Beta Was this translation helpful? Give feedback.
-
Consumers deliver messages based on the consumer configuration. You can query a stream directly using the message get APIs, through which you can effectively paginate by combining the sequence with the batch size. https://pkg.go.dev/github.com/nats-io/[email protected]/api#JSApiMsgGetRequest |
Beta Was this translation helpful? Give feedback.
-
You can call stream info or consumer info to check whether an asset exists or not. (You may not want to call it too often though, since there is a serverside cost to these calls.) |
Beta Was this translation helpful? Give feedback.
-
|
@neilalexander If push-based consumers could deliver more information to subscribers, it would be beneficial. Currently, I need to use Limit Stream to acknowledge and consume messages. After retrieving and processing messages, I pass the message sequence numbers (Seq) and processing results to the final queue for batch database insertion and counting operations, followed by deletion from Limit Stream. However, it appears that when using push consumers, subscribers can only obtain the ReplyTo identifier, which cannot be used to delete messages. Ideally, if the consumer's metadata could also be pushed to subscribers, this would further enhance functionality. |
Beta Was this translation helpful? Give feedback.
-
|
@ripienaar I found that subscribing to messages in Nats.NET returns NatsMsg, while consumers pull back NatsJSMsg, and there is no Metadata attribute in NatsMsg |
Beta Was this translation helpful? Give feedback.
-
It doesn't, you can certainly specify less than 1s fetch max wait times (if you can't it's an issue with the client library you are using not the server) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are duplicate IDs associated with consumers rather than streams, even though messages are consumed and cannot be re-added?
Why doesn't Limit Stream support deleting messages while acknowledging them?
Why don't push-based consumers support attaching metadata when pushing?
Why don't Stream and Consumer traversal support query conditions or pagination?
Why must the Fetch wait expiration be greater than 1 second?
Why is there no API to check whether a Stream or Consumer exists, and you can only detect it by exceptions thrown during retrieval or creation?
Use PurgeStreamAsynchronous to clear messages that are not locked by consumers
Beta Was this translation helpful? Give feedback.
All reactions