nats-server icon indicating copy to clipboard operation
nats-server copied to clipboard

Introduce MinAge parameter for JetStream

Open udf2457 opened this issue 1 year ago • 0 comments

Proposed change

At present in JetStream, you can configure a MaxAge to define the maximum age of a message in a stream.

However for certain applications it could be useful to have a MinAge parameter where NATS holds back messages until a timeframe has elapsed.

Use case

An example use-case could be a security focused application where, for security reasons, the company wishes to enforce a minimum delay before a user/device can take an action.

If NATS were able to handle this it would remove the need for business logic to be implemented elsewhere to enforce it, becasue the queue would enforce it naturally .... i.e. an application could blindly submit a request to the NATS stream and the NATS stream would hold it until the MinAge period elapsed, at which point it would be released for processing by workers.

Contribution

No response

udf2457 avatar Feb 06 '24 14:02 udf2457