I mis-spoke: it's client ID, not consumer ID, and you also have to set the subscription name. Read the bottom of http://activemq.apache.org/how-do-durable-queues-and-topics-work.html and make sure you've done what it says. (I don't use MQTT so I'm not sure how to do that, but I presume it can be done.) On Jun 17, 2015 6:51 AM, "Tim Bain" <tb...@alumni.duke.edu> wrote:
> I'm not understanding this line from your first email: "The broker is > always sent the messages which already sent to the subscriber before to the > subscriber when it is connected." Does that mean your consumer is > consuming (and acknowledging) messages, disconnecting, reconnecting, and > receiving the same messages again? > > If so, what acknowledgement mode are you using, and are you using > transactions? If you attach JConsole to the broker and look at the > subscription just before you disconnect, do you see the subscription's > DequeueCount equal to its enqueue count? > > Also, are you sure you're using the same consumer ID each time you > connect? In JConsole you should see only one subscription on that topic, > no matter how many times you disconnect and reconnect. > > Tim > On Jun 17, 2015 5:59 AM, "SummerScent" <scent.o.sum...@gmail.com> wrote: > >> Thanks OSATIEN for your considerate time. >> >> I follow the link you posted and see that their MQTT client also publish >> message to topic, not queue. >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://activemq.2283324.n4.nabble.com/Active-MQ-5-11-1-MQTT-Message-is-automatically-sent-to-subscriber-when-it-is-connected-tp4697874p4697885.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >