-
I am trying to make jNats messages expire after a duration of 2 seconds. However, it is not clear in the examples how to enable that for specific messages/JetStreams. Can you add examples for setting message TTL? Additionally, will reconnectBuffer consider the TTL of the message? Will it still publish messages that were cached for a duration exceeding the maxAge? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The default retentionaPolicy is already Limits so all you have to do is set the maxAge property when building the stream configuration. |
Beta Was this translation helpful? Give feedback.
-
As far as reconnectBuffer, since max age is a server side setting, the time begins when the server finishes recording the message |
Beta Was this translation helpful? Give feedback.
The default retentionaPolicy is already Limits so all you have to do is set the maxAge property when building the stream configuration.