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

Florian Meister commented on ARTEMIS-2888:
------------------------------------------

# Create an anycast queue for +/bar.

{code:java}
   <address name="*.bar">
            <anycast>
               <queue name="anycastbarqueue" />
            </anycast>
   </address>
{code}

 # Set max-size and page-size to small values to force paging immediately 
(optional)

{code:java}
        <address-setting match="*.bar">
           <max-size-bytes>100</max-size-bytes>
           <page-size-bytes>10</page-size-bytes>
           <address-full-policy>PAGE</address-full-policy>
        </address-setting>
{code}

 # Add a subscriber to +/bar with QOS 1.
 # Add a publisher, frequently publishing messages with QOS 1.
 # Disconnect the subscriber (not unsubscribe).
 # Wait until Artemis starts paging for +/bar.
 # Connect the subscriber again.
 # Messages gets delivered which were queued previously
 # Disconnect Subscriber
 # Reconnect Subscriber
 # Publish messages while subscribed
 # When publishing while subscribed every 2nd message is sent with topic-filter 
instead of topic name

{code:java}
root@tnetw0605:/etc/logstash/conf.d# mosquitto_sub -h mqtt.dev.smartprod.io -u 
user -P password -i barsubscriber -t "+/bar" -v
514e4d21-2307-11e9-ad2f-005056b451d2/bar test
+/bar test
514e4d21-2307-11e9-ad2f-005056b451d2/bar test
+/bar test
514e4d21-2307-11e9-ad2f-005056b451d2/bar test
+/bar test
514e4d21-2307-11e9-ad2f-005056b451d2/bar test
+/bar test
514e4d21-2307-11e9-ad2f-005056b451d2/bar test
+/bar test
514e4d21-2307-11e9-ad2f-005056b451d2/bar test
+/bar test
514e4d21-2307-11e9-ad2f-005056b451d2/bar test
+/bar test
514e4d21-2307-11e9-ad2f-005056b451d2/bar test
+/bar test
{code}

 # When subscribing after publishing some messages every message is delivered 
with topic-filter instead of topic name

{code:java}
root@tnetw0605:/etc/logstash/conf.d# mosquitto_sub -h mqtt.dev.smartprod.io -u 
user -P password -i barsubscriber -t "+/bar" -v
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
+/bar test
{code}

> MQTT spec violation when subscribed 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)

Reply via email to