Hi Tim Bain, Thanks you!

Yes, that's right. This is my exact trouble.


Tim Bain 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?


Here is my setting in activemq.xml for MQTT:
 <transportConnector name="mqtt"
uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;transport.defaultKeepAlive=100000&amp;needClientAuth=false"/>
And I see subscription's DequeueCount equal to its enqueue count each time
the message is delivered to the subscriber.


Tim Bain wrote
> 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?

Yes, surely consumerID is same each time it is connected.


Tim Bain wrote
> 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







--
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-tp4697874p4697890.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to