-
JetStream and Work retention policy Stream with fan-outHello everyone, I'm beginning with NATS and JetStream and I'm trying to achieve the following design: Nothing is in production yet and I'm testing with a 3 nodes JetStream Cluster with the latest versions of NATS. My goal in details
My initial designTL;DR: I'm still learning and I've discovered that this design do not allow me to add multiple Stream creationI've initially created a Jetstream Stream such as:
At first glance, the Work retention policy looks like what I want. Durable consumer creationI've read that Consumer can be seen as a View in a Stream . My original idea was to create multiple Consumers. One per I've originally created my Consumer with:
Note: So far, everything is working as expected. My Add new appAt this moment, I was thinking that I'd finished the design, all I have to do is create a new Durable Consumer. My original idea was to Create one "Durable Consumer" per So I've tried to create another Durable Consumer for
and I've faced the following error:
My understanding of the errorAt the moment, I understand that the error I've read almost all documentation I can find and I'm kinda lost. According to my understanding of the documentation, I understand that the subject filter in At the moment I'm kinda stuck and any help would be really appreciated. Regards Rémi |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Insted of ading more consumers, connect your apps to the same consumer. |
Beta Was this translation helpful? Give feedback.
OK, reading again you want more than 1 app to process the same message. Then dont use WorkQueue. WorkQueue is designed for any message being processed succesfully once only.
Use Interest or limits.
With those messages will distribute within multiple instances of teh same App (they would share a consumer) and multiple apps all get all the messages (each app is a consumer)