Error: consumer info specifies deliver_subject - pull consumers cannot have deliver_subject set
See original GitHub issueI have this configuration that throws the above error when I start the server
const opts = consumerOpts()
opts.durable(this.queueGroupName))
opts.manualAck()
opts.ackExplicit()
let sub = await this.client.jetstream().pullSubscribe(this.subject, opts)
What am I doing wrong? This code is derived from this documentation
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Messages targeted to one durable consumer received by ...
I'm experiencing issues with the creation of multiple consumers to the same stream. As per the reproduction steps below, when more than one ......
Read more >JetStream Consumers with the NATS.io Java Library
The server sends messages to push consumers while pull consumers have to ask for messages. This is mentioned here first because consumer ......
Read more >NATS C Client with JetStream and Streaming support: status.h ...
Error when parsing a protocol message, or not getting the expected ... Deliver subject not valid. ... Consumer in pull mode can not...
Read more >NATS JetStream - ThinkMicroservices.com
Today we will complete our coverage of NATS by introducing NATS JetStream message streaming and demonstrate how to integrate it into yet another ......
Read more >mod.rs - source - Docs.rs
Therefore the error case must come first, otherwise it can be ignored. ... Consumer in pull mode can not have rate limit set...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That code is a server spam because every second you are asking for 10 messages, and for the request to fail immediately if there are no messages - instead, specify an
expires
that is possibly 2000, and an interval that is slightly smaller - this will keep thepull
open and if messages arrive before the pull expires, they will be fed to you then.This requires more coordination - the library will help you coordinate this type of action soon - as we are actively looking into making the consumers pull by default (to simplify importing streams) and automatically have them re-pull every so oftne.
@Nahasean94
The IDE is right. While you don’t need to await it, you should probably handle what happens - so in the case above, if the subscription were to throw an error or was to end unexpectedly something you wouldn’t know about it - the reason for the linter warning is more about an error - if the function threw an error in the loop, that would kill your node process.
typically you: