Doubt regarding applying retention policy for jetstream

50 views
Skip to first unread message

Rois Thomas

unread,
Jan 28, 2025, 10:43:25 AMJan 28
to nats
Hey guys, I’m new to NATS and testing something. I got a deepstream pipeline image which streams messages through NATS. After deploying it in cluster, everything worked fine until I hit a storage issue. I found this page: https://docs.nats.io/using-nats/developer/develop_jetstream/model_deep_dive.
There are three retention policies for JetStream: LimitsPolicy, WorkQueuePolicy, and InterestPolicy. I want to apply InterestPolicy. Can it be set at the stream level (by modifying the image code), or can it be configured through the NATS Helm values file (since I setted up NATS in my cluster using helm)?

Alex Bozhenko

unread,
Jan 29, 2025, 1:56:51 PMJan 29
to nats

Rois Thomas

unread,
Jan 30, 2025, 9:22:43 AMJan 30
to nats
Hey, let me be more specific. I deployed NATS to my cluster through HELM values. Then I got a docker image for a deepstream pipeline which makes use of NATS to publish stream. I deployed that into my cluster too and it is working good. But the storage allocated to my jetstream is getting full due the continously generated streams. So I need to apply an retention policy to my present setup so that the storage of jetstream doesn't get full. But I have a doubt- whether I should apply the retention policy to the code of the deepstream pipeline or can I add a parameter to the helm values file through which I deployed NATS and apply this retention policy to all the stream.
I guess it would be easy to understand now. From what I have looked in the internet there are only code examples to apply this in the code part and did not find any helm parameter to apply this policy, I want to confirm this.
Reply all
Reply to author
Forward
0 new messages