activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <>
Subject Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected
Date Thu, 25 Jun 2015 13:58:56 GMT
I'm trying to understand the behavior you're seeing since from your
description it sounds like there could be multiple problems here, so I've
got some questions.

   1. If you send two messages with the RETAINED flag set and then connect
   your client, do you get one message or two?  (Based on that link I sent
   you, I think "one" would be the correct answer, so if it's more than one,
   that's a bug - unless that documentation's wrong or I'm misreading it.)
   2. If you then disconnect and reconnect your client, do you get zero,
   one, or two messages?  (Based on,
   reconnecting a durable subscriber should not result in any retained
   messages being delivered so "zero" would be the correct answer here and any
   other sounds like a bug.)


On Tue, Jun 23, 2015 at 1:45 AM, SummerScent <>

> Hi Tim,
> I think MQTT messages has RETAINED Flag will be sent to the subscribing
> clients which not yet received the message.
> But ActiveMQ 5.10, 5.11: the broker always send the message to the client
> even the message already delivered to this client before.
> Thank you, Tim, for your time following my problem.
> Tim Bain wrote
> > If I understand correctly, what you're saying is that the messages that
> > were being redelivered each time were doing so because they'd been sent
> > with the RETAIN flag
> > &lt;;
> > set,
> > which (according to that page) means that they are supposed to be
> > delivered
> > to a subscriber when it subscribes.  Based on that page, only the last
> > retained message should be delivered when the subscriber subscribes; was
> > that the behavior you were seeing, or were you getting more than one
> > message per subscriber each time?
> >
> > I don't see anything in that description that says that a subscriber
> > should
> > receive the message at any time other than when it *subscribes*, though
> > maybe the correct implementation is to send the latest message on each
> > reconnect and the page is just misleading.  Do you have further
> > information
> > about the proper behavior of MQTT on that point?
> >
> > Tim
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message