Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-25 Thread Tim Bain
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 tha

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-23 Thread 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

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-22 Thread Timothy Bish
At this point what would really be helpful is some test code that shows what is going on. Otherwise it is hard to understand the real problem and the intended use case here. On Mon, Jun 22, 2015 at 9:00 AM, Tim Bain wrote: > If I understand correctly, what you're saying is that the messages tha

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-22 Thread Tim Bain
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 set, which (according to that page) means that they are supposed to

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-21 Thread SummerScent
Hi Tim, Thanks so much for your consideration. Last time the subscriber automatically receive the message when connected is because I publish the message with RETAINED flag. But I have the trouble with the durable subscription created by Web Console: Some durable subscriptions are working well w

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-21 Thread Tim Bain
I'm at a bit of a loss. Your expectation that a durable subscriber should only get delivered those messages it hasn't already received is correct, so there's probably a bug here. I'd like you to submit a bug in JIRA along with your broker config and client code and a description of the behavior (

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread SummerScent
Hi Tim, Here is an example of the dispatched queue, enqueue, dequeue count. -- 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-

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread SummerScent
Hi Tim, Only one subscription for that topic. enqueue count and dequeue count and dispatched count they are almost equal. And they are all increased each time the subscriber is connected. Thank you! Tim Bain wrote > How many subscriptions do you see for that topic via JConsole? If you see

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread SummerScent
Thanks William-2. 1. Yes, AMQ does not support that. So I tried to create a pre-defined a Durable Topic Subscriber from Webconsole to receive all the message. These message is in pending in state. When my actual Subscriber is connected, all the above pending message are delivered to my Subscribe

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread William
for my personal view, 1, if you want to impl some requirement like ‘offline message’ for those never online user AMQ doesn’t support that. The consumer must connect broker at least once as durable subscriber, then he can receive offline msg afterwards even after he offline and then onl

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread Tim Bain
How many subscriptions do you see for that topic via JConsole? If you see more than one, that's your problem and you need to figure out why. If you see only one subscription, what happens to the enqueue count and dequeue count and dispatched count when you reconnect the consumer? I'd expect them

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread SummerScent
Thank you! I also create the same subscription name for each topic. -- 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-tp4697874p4697891.html Sent from the ActiveMQ - User mailing list ar

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread SummerScent
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 co

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread Tim Bain
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

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread Tim Bain
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

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread SummerScent
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-i

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread ALi
i am not too sure what do you need to do ... and i dont know how do you connect to mqtt but as i have seen here http://stackoverflow.com/questions/27189086/activemq-lost-persistent-message-sent-to-detached-consumer-before-keepaliveinter you need to set QoS by message, can you try? On Wed,

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread SummerScent
Thanks OSATIEN, What do you mean passed message? The message is already sent to subscriber? I have only one Subscriber for some topics. My main purpose is to receive all the message which is published to topics even the subscriber is not connected before that. Can you tell me how MQTT client ca

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread ALi
why topic? why not use a queue if you dont want to receive all passed messages? many subscriber to one queue? http://activemq.apache.org/how-do-durable-queues-and-topics-work.html On Wed, Jun 17, 2015 at 12:17 PM, SummerScent wrote: > Thanks William -2, > > And the most headache problem now is

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread SummerScent
Thanks William -2, And the most headache problem now is that the ActiveMQ 5.10,11 always send the message (which are sent to subscriber before) again to the subscriber when subscriber is connected. ActiveMQ 5.10 and 5.11 has same problem. -- View this message in context: http://activemq.2

Re: Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread William
As I know, AMQ does not support this. > On Jun 17, 2015, at 5:14 PM, SummerScent wrote: > > Hi all, > > I am so new to ActiveMQ. > > I am using ActiveMQ MQTT for my project. > > My subscriber need to receive all offline messages even they are connected > at the first time after ActiveMQ is st

Active MQ 5.11.1 MQTT Message is automatically sent to subscriber when it is connected

2015-06-17 Thread SummerScent
Hi all, I am so new to ActiveMQ. I am using ActiveMQ MQTT for my project. My subscriber need to receive all offline messages even they are connected at the first time after ActiveMQ is started. I tried to created an durable topic subscriber from web console. So all offline message will be deliv