Filter every durable consumer to its own subject

Fixkamo-shared-library
Shipped
27 Agosti 2026, 20:32 UTC
Author
Kamo
Commit
e9ac4bf

A durable created through NatsMessageService.subscribe carried no filter subject, so it received the WHOLE stream regardless of the subject it was asked for. The configuration handed to PushSubscribeOptions is taken as given, and it never set one. The chat relay is where that surfaced. ChatSessionSubscriptionManager creates one consumer per conversation, durable named for the session GUID, subject chat.session.<guid> — and forwards whatever arrives to the topic of the session it subscribed FOR. Unfiltered, each of those consumers was taking every frame on chat.> and voip.> for the entire platform and re-publishing it into one conversation's topic: in production a session with four messages today had taken 5371 deliveries. So every open chat window was told about every message, read receipt and member-added event in the product. A read receipt landing in an unrelated conversation is a window that opens itself for no reason a member can see, and a message landing there is somebody else's conversation on their screen. reconcileDurableFilter already deletes a durable whose stored filter is not the one being asked for, so the consumers created without one are repaired on the next subscribe. It also stops firing on every subscribe, which is what it has been doing since a stored empty filter never matches a requested subject.

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei