Skip to content

Commit 9b8e58e

Browse files
committed
Use Pattern also for shared subscription without wildcards
1 parent 1d6b3c9 commit 9b8e58e

File tree

1 file changed

+1
-1
lines changed
  • smallrye-reactive-messaging-mqtt/src/main/java/io/smallrye/reactive/messaging/mqtt

1 file changed

+1
-1
lines changed

smallrye-reactive-messaging-mqtt/src/main/java/io/smallrye/reactive/messaging/mqtt/MqttSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public MqttSource(Vertx vertx, MqttConnectorIncomingConfiguration config,
4949
MqttFailureHandler.Strategy strategy = MqttFailureHandler.Strategy.from(config.getFailureStrategy());
5050
MqttFailureHandler onNack = createFailureHandler(strategy, config.getChannel());
5151

52-
if (topic.contains("#") || topic.contains("+")) {
52+
if (topic.contains("#") || topic.contains("+") || topic.startsWith("$share/")) {
5353
String replace = MqttTopicHelper.escapeTopicSpecialWord(MqttHelpers.rebuildMatchesWithSharedSubscription(topic))
5454
.replace("+", "[^/]+")
5555
.replace("#", ".+");

0 commit comments

Comments
 (0)