Skip to content
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

Nats defered message #3403

Open
Julienhardis opened this issue Aug 25, 2022 · 6 comments
Open

Nats defered message #3403

Julienhardis opened this issue Aug 25, 2022 · 6 comments

Comments

@Julienhardis
Copy link

Julienhardis commented Aug 25, 2022

Hello,

we need to defer the delivery of message like it is described in this discussion :

#2731

(here too : #2846)

I did some investigations about it in issues or discussions and it seems that it's a current need.

Are you considering this in a future release ?

For your information there is a fork on this subject :

c0d0615

Thank you by advance.

Julien

@alifpay
Copy link

alifpay commented Sep 7, 2022

there is package asyncjobs, it has what you want and uses nats

https://github.com/choria-io/asyncjobs

@Julienhardis
Copy link
Author

thank you, i'm going to read the documentation.

@abelkuruvilla
Copy link

@alifpay I think the asyncjobs misses the key feature requested here, i.e, run send a message after a delay of specified time. The server should send the message to subscriber clients only after the specified time/duration has passed.
@Julienhardis I am also looking for this. Have you had any luck finding any solution ?

@derekcollison
Copy link
Member

We have had a few requests for this, but not a current priority unless someone steps up and wants to sponsor the work.

@vposham
Copy link

vposham commented Mar 19, 2023

Maybe I did not understand the requirement correctly, doesn't Jetstream already give us NakWithDelay with which consumer can write this logic by reading the payload?

@johnlcox
Copy link

johnlcox commented Apr 6, 2023

I'd also liked to see this feature so that a message can be delayed/deferred at publish time rather then need to consume and then nak. We have a use case where we are updating 2 systems -- a JetStream stream and a Cassandra table. We publish to the stream first and the Cassandra table second as the Cassandra table is the source of truth. The consumer of the stream will then reconcile the two to filter out messages that may have failed to get inserted into Cassandra.

Without the delayed message on publish, the consumer is likely to fetch messages before the Cassandra write has actually finished. The consumer will either need an artificial wait or the consumer will need to nak most messages to be redelivered after a time we expect Cassandra to have been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants