MQTT messaged don't seem to be retained

239 views
Skip to first unread message

VladB

unread,
Jan 13, 2017, 10:02:57 AM1/13/17
to rabbitmq-users
I'm a new RabbitMQ user.
I've managed to set up a rabbitmq 2-node cluster, with web and mqtt plugins.

I'm stuck at making mqtt retained messages to work

rabbitmqctl environment

 {rabbitmq_mqtt,
     [{allow_anonymous,true},
      {default_user,<<"guest">>},
      {exchange,<<"amq.topic">>},
      {num_ssl_acceptors,1},
      {num_tcp_acceptors,10},
      {prefetch,10},
      {retained_message_store,rabbit_mqtt_retained_msg_store_dets},
      {retained_message_store_dets_sync_interval,2000},
      {ssl_cert_login,false},
      {ssl_listeners,[]},
      {subscription_ttl,86400000},
      {tcp_listen_options,[{backlog,128},{nodelay,true}]},
      {tcp_listeners,[1883]},
      {vhost,<<"/">>}]},

As i read on the mqtt documentation plugin the two values needed appear to be defaults

      {retained_message_store,rabbit_mqtt_retained_msg_store_dets},
      {retained_message_store_dets_sync_interval,2000},

How i test
C1 - client1 / user1 
C2 - client2 / user2

connect C1 and subcribe to # -> no messages
connect C2 and send one retained message and one normal -> c2 sees both
disconnect C1
C2 publishes retained message
C1 reconnects and subscribes to # -> no messages

I'm probably missing something. Can anyone point me in the right  direction ?

Thank you for your time
Vlad


Michael Klishin

unread,
Jan 13, 2017, 10:07:02 AM1/13/17
to rabbitm...@googlegroups.com, VladB
Retainer in the MQTT plugin does not support wildcards, only specific topics. 
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to rabbitm...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
MK

Staff Software Engineer, Pivotal/RabbitMQ


Reply all
Reply to author
Forward
0 new messages