FlashMQ version 1.9.0 introduces several mechanisms to prevent overloads by clients subscribing to broad wildcard topics. There are two causes of load:
- If you have a base message load of 100,000 messages per second, each client subscribing to # causes that many permission checks per second. If you have 100 clients doing that, there will be 10 million permission checks per second.
- If you have a large tree of retained messages, a subscription to
#means all the nodes of the trees are searched for messages. There already is the config option
retained_messages_node_limit, but that results in aborting the process at a random point.
The following abilities have been added to control this:
- The options
wildcard_subscription_deny_mode. With it, you can prevent subscriptions to something like
sensors/+/temperature. To allow
one/two/three/#, specify 3 as minimum value. The deny mode specifies
- The plugin has the ability to return
success_without_retained_deliveryon a subscription. This allows the subscription to work, but without attempting to deliver retained messages.
Downloads available as usual.