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. >