You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Adam Zyzak (Jira)" <ji...@apache.org> on 2024/10/23 13:44:00 UTC

[jira] [Created] (ARTEMIS-5121) Improve performance of SUBSCRIPTION_IDENTIFIER fetching from MQTT session state

Adam Zyzak created ARTEMIS-5121:
-----------------------------------

             Summary: Improve performance of SUBSCRIPTION_IDENTIFIER fetching from MQTT session state
                 Key: ARTEMIS-5121
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5121
             Project: ActiveMQ Artemis
          Issue Type: Improvement
          Components: MQTT
    Affects Versions: 2.37.0
            Reporter: Adam Zyzak


Recently I performed stress test of a system using Artemis as a message broker for MQTT and STOMP protocols. I noticed huge difference in performance and CPU usage between these protocols.

I made some jstacks and it shown that majority of time is spent in method org.apache.activemq.artemis.core.protocol.mqtt.MQTTSessionState#getMatchingSubscriptionIdentifiers compiling regular expressions. 

It would be helpful if performance of this method was improved, especially since it is executed on every publish, either by caching compiled patterns, adding special cases for simpler topic names (topic names without special characters may be compared using equality, # subscriptions can be always added and topic names having # at the end can be compared using startsWith) or just adding option to configuration allowing to skip adding SUBSCRIPTION_IDENTIFIER to publish message.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact