Hi Joe,

Thanks for your questions.

For *MaxPersistentFanout* and *MaxPersistentFanoutBytes* — yes, the system
will stop delivering to persistent subscribers that exceed the current
configured limit, rather than dropping the entire message. For
example, if MaxPersistentFanout
= 10 and the topic "/a/b/c" currently has 15 persistent subscribers,
BifroMQ will deliver to the first 10 (deterministically ordered) and then
stop fanout to the remaining 5. The relevant throttling event will be
emitted. The behavior for MaxPersistentFanoutBytes is similar — recipients
are admitted until the total payload bytes budget is reached, then delivery
stops for the rest.

For *MaxGroupFanout* — the limit applies to the *number of matched
shared-subscription groups* per message, not the number of members within a
group. (The number of members per group can be controlled separately via
the tenant-level runtime setting *MaxSharedGroupMembers*) Therefore,
MaxGroupFanout does not change how a matched shared group itself behaves —
only how many distinct groups are included in delivery.

As for estimating appropriate values — this really depends on factors such
as available resources, workload patterns, and business requirements, so
it’s best decided with a combination of operational metrics and
business-level considerations.


Best regards,

On Wed, Aug 13, 2025 at 8:08 PM gujiaweijoe <[email protected]> wrote:

> Hi Yonny,
>
> Thank you for your proposal. I have a few questions regarding the behavior
> when a persistent-related throttle is triggered:
>
>
> For MaxPersistentFanout&nbsp;and MaxPersistentFanoutBytes&nbsp;— will the
> system drop entire messages, or will it drop only some recipients to stay
> within the limit? From the proposal, it seems to drop recipients. Could you
> clarify what policy will be applied?
>
>
>
> For MaxGroupFanout&nbsp;— if this throttle is triggered, will the system
> drop newly subscribed recipients, or is there a different expected behavior?
>
>
>
> Since these settings are hot-reloadable, is it possible to estimate
> appropriate values based on the cluster size?
>
>
>
>
>
> Best regards,
> Gu Jiawei (Joe)
>
>
>          原始邮件
>
>
> 发件人:Yonny Hao <[email protected]&gt;
> 发件时间:2025年8月13日 17:20
> 收件人:dev <[email protected]&gt;
> 主题:[Discuss] BIP-002 Runtime Settings for Limiting Fanout Scale
> toPersistent Sessions
>
>
>
>        Hello&nbsp;all,
>
>
> I’d&nbsp;like&nbsp;to&nbsp;start&nbsp;a&nbsp;discussion&nbsp;on&nbsp;*BIP-002:&nbsp;Runtime&nbsp;Settings&nbsp;for&nbsp;Limiting
> Fanout&nbsp;Scale&nbsp;to&nbsp;Persistent&nbsp;Sessions(&nbsp;*
>
> https://cwiki.apache.org/confluence/display/BIFROMQ/BIP-002%3A+Runtime+Settings+for+Limiting+Fanout+Scale+to+Persistent+Sessions
> &nbsp;*)*
> <https://cwiki.apache.org/confluence/display/BIFROMQ/BIP-002%3A+Runtime+Settings+for+Limiting+Fanout+Scale+to+Persistent+Sessions&nbsp;*)*>
> .
>
>
> This&nbsp;feature&nbsp;helps&nbsp;operators&nbsp;better&nbsp;control&nbsp;persistent-session&nbsp;fanout&nbsp;in
>
> multi-tenant&nbsp;scenarios,&nbsp;preventing&nbsp;*DistService*&nbsp;and&nbsp;*InboxService*
>
> hotspots&nbsp;caused&nbsp;by&nbsp;large&nbsp;persistent&nbsp;subscriber&nbsp;sets&nbsp;or&nbsp;many
> shared-subscription&nbsp;groups&nbsp;with&nbsp;persistent&nbsp;members.
>
>
> The&nbsp;proposal&nbsp;introduces&nbsp;three&nbsp;*tenant-level,&nbsp;runtime-configurable*&nbsp;settings:
>
>
> &nbsp;&nbsp;&nbsp;-
>
>
> &nbsp;&nbsp;&nbsp;*MaxPersistentFanout*&nbsp;–&nbsp;caps&nbsp;the&nbsp;number&nbsp;of&nbsp;persistent&nbsp;sessions&nbsp;per
> &nbsp;&nbsp;&nbsp;message.
> &nbsp;&nbsp;&nbsp;-
>
>
> &nbsp;&nbsp;&nbsp;*MaxPersistentFanoutBytes*&nbsp;–&nbsp;caps&nbsp;the&nbsp;total&nbsp;bytes&nbsp;fanned&nbsp;out&nbsp;to
> &nbsp;&nbsp;&nbsp;persistent&nbsp;sessions&nbsp;per&nbsp;message.
> &nbsp;&nbsp;&nbsp;-
>
>
> &nbsp;&nbsp;&nbsp;*MaxGroupFanout*&nbsp;–&nbsp;caps&nbsp;the&nbsp;number&nbsp;of&nbsp;shared-subscription&nbsp;groups&nbsp;per
> &nbsp;&nbsp;&nbsp;topic.
>
>
> I’ve&nbsp;started&nbsp;the&nbsp;implementation&nbsp;in&nbsp;my&nbsp;forked&nbsp;branch:
> https://github.com/popduke/bifromq/tree/feat-max-persistent-fanout-limit
>
>
> Looking&nbsp;forward&nbsp;to&nbsp;your&nbsp;thoughts&nbsp;and&nbsp;suggestions.
>
> Best&nbsp;regards,
>
> --&nbsp;
> Yonny(Yu)&nbsp;Hao



-- 
Yonny(Yu) Hao

Reply via email to