This adds support for subscription filters, which allows the user to explicitly specify topics of interest to the pubsub system.
Only topics that satisfy the filter will be tracked for other peers, which reduces processing load and memory requirements in the system.
Similarly, the user will be able to join only topics allowed by the filter.
Usage
The filter is enabled by passing the WithSubscriptionFilter option to the pubsub constructor.
A couple of basic filters are provided as part of the library; the user may implement more elaborate filtering logic by implementing the SubscriptionFilter interface
Topic Subscription Filters
This adds support for subscription filters, which allows the user to explicitly specify topics of interest to the pubsub system. Only topics that satisfy the filter will be tracked for other peers, which reduces processing load and memory requirements in the system. Similarly, the user will be able to join only topics allowed by the filter.
Usage
The filter is enabled by passing the
WithSubscriptionFilter
option to the pubsub constructor. A couple of basic filters are provided as part of the library; the user may implement more elaborate filtering logic by implementing theSubscriptionFilter
interface