-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish RetryAttempt and RetryWait not working as expected #1664
Comments
Raised a PR for same here #1667 |
The current bahavior is restrained by |
Any specific reason why it only retries in case of "No Responder" case. There can be many other cases too where user expect nats to retry publish. |
Only retrying on .net We're trying to find a better name for async publish, meaning - a publish that does not wait for ack, but returnes a future of a kind ;). |
What are your thoughts on providing Retry Attempts in Async Publish ? |
@Jarema Currently async publish does not support retry, is there any plan to fix/add later. |
@sourabhaggrawal at least the new |
Great, can you share some example for async Publish using new jetstream api ? |
Hello @sourabhaggrawal, sorry for taking so long with this. Please see my reply here for an example using new JetStream API. We'll also be adding the retries to the old API, but I'm not yet sure it'll make it to the next release. |
Observed behavior
js.Publish("test", []byte("hi"), nats.RetryWait(5*time.Second), nats.RetryAttempts(10))
It gives up at first attempt itself after waiting for 5 second.
Expected behavior
This supposed to retry 10 times if there is "no responder" error and should retry 5 times before it gives up. So after 50 seconds it should give up if there is "no responder" error on every attempt.
Server and client version
nats-server 2.10.3
nats-client 1.35.0
Host environment
Mac OS
Steps to reproduce
Publish a message to subject which is not associated to stream, configure retry attempt and retrywait.
js.Publish("test", []byte("hi"), nats.RetryWait(5*time.Second), nats.RetryAttempts(10))
The text was updated successfully, but these errors were encountered: