jbertram commented on code in PR #5757:
URL: https://github.com/apache/activemq-artemis/pull/5757#discussion_r2138633128
##########
artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTSessionState.java:
##########
@@ -587,8 +588,8 @@ public Integer getMatchingId(String topic) {
private void update(MqttTopicSubscription newSub, Integer newId) {
if (newId != null && !newId.equals(id)) {
- if (this.topicFilterPattern == null ||
!subscription.topicFilter().equals(newSub.topicFilter())) {
- topicFilterPattern = Match.createPattern(newSub.topicFilter(),
MQTTUtil.MQTT_WILDCARD, true);
+ if (this.address == null ||
!subscription.topicFilter().equals(newSub.topicFilter())) {
+ address = new
AddressImpl(SimpleString.of(newSub.topicFilter()), MQTTUtil.MQTT_WILDCARD);
Review Comment:
I implemented a `static` version of `matches`
[here](https://github.com/jbertram/activemq-artemis/commit/57a05675d148cf5e095015d61e242b26ef316106).
I'm not sure it's an improvement overall. Let me know what you think.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact