Replies: 2 comments 1 reply
-
The way to do server-side filtering of messages with NATS JetStream is with When designing well-suited subject hierarchies, the server-side filtering for consumers is made easier as well: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you. Is it correct then I should use the same message in multiple
subjects, e.g a subject per client? E.g. if I have a user, and they are
relevant for e.g
Building 1, building 2, but not building 3, I should publish to both
building 1 and 2 subjects?
…On Mon, Jul 7, 2025, 8:54 PM Maurice van Veen ***@***.***> wrote:
The way to do server-side filtering of messages with NATS JetStream is
with FilterSubject(s):
https://docs.nats.io/nats-concepts/jetstream/consumers#filtersubjects
When designing well-suited subject hierarchies, the server-side filtering
for consumers is made easier as well:
https://docs.nats.io/nats-concepts/subjects
—
Reply to this email directly, view it on GitHub
<#7039 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKVVYNE7B2ZFIXSASYSBLL3HJGW7AVCNFSM6AAAAACA42ROK6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNRYGI2TOMQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
Currently evalulating NATs, and I was wondering if there is a pattern I could use for the following situation:
I have multiple listeners to a topic, however I want them to only receive the messages relevant for them, via e.g. some metadata. Ideally the client would say, give me messages in this topic which match some filter the client defines, without having to download/parse each message (because my clients may be iot devices with low bandwidth).
I want to avoid having to publish to multiple topics because it would cause a lot of duplicate messages, and I don't want to have a topic per client as there may be many clients.
e.g. If I have 100 clients, some messages are only for client 1, some for client 1 & 2, some for all clients etc.
Beta Was this translation helpful? Give feedback.
All reactions