You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2020/08/27 16:07:00 UTC

[jira] [Commented] (ARTEMIS-2888) Publishes to Wildcard Topic

    [ https://issues.apache.org/jira/browse/ARTEMIS-2888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17185938#comment-17185938 ] 

Justin Bertram commented on ARTEMIS-2888:
-----------------------------------------

I think the part of the spec you meant to cite was [MQTT-3.3.2-2|http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718039] which states:

bq. The Topic Name in the PUBLISH Packet MUST NOT contain wildcard characters.

I believe the bit of the spec you cited was simply saying you can't use wildcard characters when naming a topic.

I tried to reproduce this by modifying a test in the test-suite to subscribe to {{+/bar}} and publish to {{foo/bar}}, but everything worked according to spec (i.e. there were no wildcards in the Topic Name of the PUBLISH packet). Can you provide more specific steps to reproduce or at the very least [turn on TRACE logging for {{org.apache.activemq.artemis.core.protocol.mqtt}}|https://github.com/apache/activemq-artemis/blob/master/docs/user-manual/en/logging.md#activating-trace-for-a-specific-logger], reproduce the issue, and add the logs here?

> Publishes to Wildcard Topic
> ---------------------------
>
>                 Key: ARTEMIS-2888
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2888
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: MQTT
>    Affects Versions: 2.14.0
>         Environment: *Message Producer:*
> MQTTnet Client
> published Message to  0e5ed50e-ccea-4a42-8c3e-db0e2780222b/from-smart-acquisition-device/machine-state/event/off
>  
> *Message Consumer:*
> MQTT Paho Java Client, also tested with HiveMQ Java Client.
> Subscribed to +/from-smart-acquisition-device/machine-state/event/off
>            Reporter: Florian Meister
>            Priority: Major
>         Attachments: image-2020-08-27-12-37-01-479.png
>
>
> Sometimes the topic name of published messages contains the topic filter instead of the topic name.
> This is neither correct nor allowed in the MQTT 3.1.1 specification:
> [http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718106]
>  
> Below a screenshot of an example MQTT Packet sent from the Artemis Broker
> !image-2020-08-27-12-37-01-479.png!
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)