Ack does not work
See original GitHub issueHey there,
We are currently working on a streaming python client that reads from NATS streaming, does some processing and then publishes the result into another subject in NATS streaming. See the code below:
# ---8< code was cut here >8---
async def cb(msg):
nonlocal sc
# when I ack the message directly the code works fine
# await sc.ack(msg)
# doing some processing here to create pubmsg
pubmsg = ...
await sc.publish('processed', pubmsg)
# this ack does not keep NATS streaming from resending the message after 30s
await sc.ack(msg)
await sc.subscribe('notprocessed', start_at='first', cb=cb, manual_acks=True, ack_wait=30)
# ---8< code was cut here >8---
The processing takes way shorter than the 30 seconds timeout for re-sends. Pulling the ack up in the code makes this sample work like expected.
Any ideas of what we do wrong?
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Ack doesn't do anything as a helper :: My Time At Portia ...
I am having this problem with Ack as well. I have him as a buddy, have fixed him, put flowers on grave, and...
Read more >Python subprocess: Ack does not work - Stack Overflow
I am trying to execute f = open("test.txt", "w") check_call('ack "foo" /path/to/Documents/filename.txt', shell=True, stdout=f).
Read more >Ack command does not work on Windows 10 for Neovim #60
On Linux, it works as expected. But on Windows, the command Ack simply does not work. Version info Neovim: version 0.3.4 Windows: Windows...
Read more >manual Ack does not work after first message anymore
i have setup a "consumer" for a rabbitmq queue. Every delivery is put in a channel which is picked up by a goroutine...
Read more >Ack/Ag does not return search result without
Then an excellent thing to do would be to look at the manual (either man ack or ack --man ) and search for...
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
@wallyqs awesome, it looks like we where right-- we dropped the max inflight from the default down to 10 and we haven’t gotten the issue since. Funnily enough we also did an update yesterday to log msg.sub._msgs_queue.qsize() directly (but using a property is more correct). Thank you for all your help!
@juandiegopalomino yes I think that is what might be happening, the client could be buffering several redeliveries. First will add the following to be able to confirm the status of the client buffer: https://github.com/nats-io/asyncio-nats-streaming/compare/pending-queue-size Also need to consider whether need to add some logic to the client to ignore buffered messages that have already been acked…