You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by wuwufen <17...@qq.com> on 2015/11/11 03:35:14 UTC

a problem about mqtt and activemq

hi everyone
     i subscribe and unsubscribe topic in activemq by
mqttconnection(durable)many times。a problem occur。
when i subscribe the topic i received the message that created before i
subscribed。
(sorry,i‘m not good at english)
thank you inadvance



--
View this message in context: http://activemq.2283324.n4.nabble.com/a-problem-about-mqtt-and-activemq-tp4703831.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: a problem about mqtt and activemq

Posted by Tim Bain <tb...@alumni.duke.edu>.
This sounds kind of like retroactive consumers (
http://activemq.apache.org/retroactive-consumer.html); are you using that
feature?

Are you able to reproduce this reliably in a test environment where you can
change things and see the effects?  If so, does the problem occur with
non-durable subscriptions?

When the unsubscription doesn't work properly, can you confirm that the
subscription is gone from the broker?  You can see that via JMX.

If two messages are sent while the consumer is unsubscribed, does it get
both or only one?

Does each subscription run through the same exact code?

Tim
On Nov 11, 2015 5:54 PM, "wuwufen" <17...@qq.com> wrote:

> 3 mqttClent (c1,c2,c3,c4,c5);mqttclent setClindId,cleansession=false;
>  activemq 5.12.0 (or befor)
>  test topic(T)
>
>
>
> 1     c1,c2,c3 subscribe T
> 2     c5 send message m1 to T
> 3     c1,c2,c3 received m1
>
> .......sometimes (problem occurs)
>
> 4    c1 unsubscribe T
> 5    c5 send message m2 to T (b c received m2)
> 6    c1  subscribe  T
> 7    c1 received  m2
>
> 8    c1 unsubscribe T
> 9    c1  subscribe  T
> 10   c1 received  m2
> :
> :
> if(this problem occurs)
> {
>    11    d  subscribe  T
>    12    d received  m2   //i don't know why
>
> }
>
>
> at last
> 13      b ,c ,d unsubscribe T
> 14      a unsubscribe T
> 15      a subscribe  T
> 16      the result change good   a din't received m2
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/a-problem-about-mqtt-and-activemq-tp4703831p4703895.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: a problem about mqtt and activemq

Posted by wuwufen <17...@qq.com>.
3 mqttClent (c1,c2,c3,c4,c5);mqttclent setClindId,cleansession=false;
 activemq 5.12.0 (or befor)
 test topic(T)



1     c1,c2,c3 subscribe T
2     c5 send message m1 to T
3     c1,c2,c3 received m1

.......sometimes (problem occurs)

4    c1 unsubscribe T
5    c5 send message m2 to T (b c received m2)
6    c1  subscribe  T
7    c1 received  m2

8    c1 unsubscribe T
9    c1  subscribe  T
10   c1 received  m2
:
:
if(this problem occurs)
{
   11    d  subscribe  T
   12    d received  m2   //i don't know why

}


at last
13      b ,c ,d unsubscribe T
14      a unsubscribe T
15      a subscribe  T
16      the result change good   a din't received m2













--
View this message in context: http://activemq.2283324.n4.nabble.com/a-problem-about-mqtt-and-activemq-tp4703831p4703895.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: a problem about mqtt and activemq

Posted by Clebert Suconic <cl...@gmail.com>.
> (sorry,i‘m not good at english)


speak in Java then ;), show an example and the exception or error
that's happening.

Also include the version of ActiveMQ where this is happening.