Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C04BDC840 for ; Thu, 11 Jul 2013 09:04:49 +0000 (UTC) Received: (qmail 82087 invoked by uid 500); 11 Jul 2013 09:04:49 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 81014 invoked by uid 500); 11 Jul 2013 09:04:43 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 80999 invoked by uid 99); 11 Jul 2013 09:04:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 09:04:40 +0000 X-ASF-Spam-Status: No, hits=4.7 required=5.0 tests=HTML_FONT_FACE_BAD,HTML_MESSAGE,SPF_FAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: encountered temporary error during SPF processing of domain of linuxcrazy@126.com) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jul 2013 09:04:34 +0000 Received: from [192.168.236.139] (helo=joe.nabble.com) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UxCmc-0000SE-Ob for users@activemq.apache.org; Thu, 11 Jul 2013 02:03:26 -0700 Date: Thu, 11 Jul 2013 02:03:11 -0700 (PDT) From: linuxcrazy To: users@activemq.apache.org Message-ID: In-Reply-To: References: <1372831774796-4668829.post@n4.nabble.com> Subject: =?UTF-8?Q?=E7=AD=94=E5=A4=8D:_Problem_about_Repeat_subscribe_me?= =?UTF-8?Q?ssage_by_mqttv3_and_the_same_clientId?= MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_369876_7884182.1373533391744" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_369876_7884182.1373533391744 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for your replay. This problem has been fixed in ActiveMq( Version:apache-activemq-5.9.0.redhat-610-20130705.003458-6). =20 _____ =20 =E5=8F=91=E4=BB=B6=E4=BA=BA: subscription-bounces+s2283324u375479@n4.nabble= .com [mailto:subscription-bounces+s2283324u375479@n4.nabble.com] =E4=BB=A3=E8=A1= =A8 ceposta [via ActiveMQ] =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2013=E5=B9=B47=E6=9C=889=E6=97=A5 5:1= 8 =E6=94=B6=E4=BB=B6=E4=BA=BA: linuxcrazy =E4=B8=BB=E9=A2=98: Re: Problem about Repeat subscribe message by mqttv3 an= d the same clientId Which client are you using? can you put together a small unit test that=20 shows this?=20 I cannot reproduce with the small test I tried.=20 On Wed, Jul 3, 2013 at 2:09 AM, linuxcrazy <[hidden email]> wrote:=20 > Client:mqttv3,Server:=20 > apache-activemq-5.9.0.redhat-610-20130702.003414-4-bin.zip=20 >=20 > code:=20 > String clientId =3D "mqtt_test";=20 > MqttClient client =3D new=20 > MqttClient("tcp://localhost:1883",clientId);=20 > CallBack callback =3D new CallBack();=20 > client.setCallback(callback);=20 > MqttConnectOptions conOptions =3D new=20 > MqttConnectOptions();=20 > conOptions.setUserName("mqttMessage");=20 >=20 > conOptions.setPassword("mqttMessage".toCharArray());=20 > conOptions.setCleanSession(false);=20 > client.connect(conOptions);=20 > String[] topics =3D=20 > {"topic.test","topic.test1","topic.test2","topic.test"};=20 > client.subscribe(topics);=20 >=20 >=20 > AMQ Server Errors:=20 > =3D=3D=3D=3D=3D=3D=3D=20 > WARN | Async error occurred: javax.jms.JMSException: Durable consumer is in=20 > use=20 > for client: mqtt_test and subscriptionName: mqtt_test topic.test=20 > javax.jms.JMSException: Durable consumer is in use for client: mqtt_test= =20 > and=20 > subscriptionName: mqtt_test=20 > at=20 >=20 > org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:= 1 23)=20 > at=20 >=20 > org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.jav= a :390)=20 > at=20 >=20 > org.apache.activemq.broker.jmx.ManagedRegionBroker.addConsumer(ManagedRegio= n Broker.java:229)=20 > at=20 > org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)= =20 > at=20 >=20 > org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java= : 76)=20 > at=20 > org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)= =20 > at=20 > org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)= =20 > at=20 > org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)= =20 > at=20 >=20 > org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFil= t er.java:102)=20 > at=20 >=20 > org.apache.activemq.broker.TransportConnection.processAddConsumer(Transport= C onnection.java:619)=20 > at=20 > org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:347)=20 > at=20 >=20 > org.apache.activemq.broker.TransportConnection.service(TransportConnection.= j ava:329)=20 > at=20 >=20 > org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnect= i on.java:184)=20 > at=20 >=20 > org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:= 4 5)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTInactivityMonitor.onCommand(MQTTInac= t ivityMonitor.java:147)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTTransportFilter.sendToActiveMQ(MQTTT= r ansportFilter.java:91)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTProtocolConverter.sendToActiveMQ(MQT= T ProtocolConverter.java:133)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onSubscribe(MQTTPr= o tocolConverter.java:325)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onSubscribe(MQTTPr= o tocolConverter.java:292)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onMQTTCommand(MQTT= P rotocolConverter.java:167)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTTransportFilter.onCommand(MQTTTransp= o rtFilter.java:79)=20 > at=20 >=20 > org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport= . java:83)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTCodec.processCommand(MQTTCodec.java:= 1 14)=20 > at=20 > org.apache.activemq.transport.mqtt.MQTTCodec.parse(MQTTCodec.java:84)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTNIOTransport.serviceRead(MQTTNIOTran= s port.java:105)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTNIOTransport.access$000(MQTTNIOTrans= p ort.java:43)=20 > at=20 >=20 > org.apache.activemq.transport.mqtt.MQTTNIOTransport$1.onSelect(MQTTNIOTrans= p ort.java:66)=20 > at=20 >=20 > org.apache.activemq.transport.nio.SelectorSelection.onSelect(SelectorSelect= i on.java:94)=20 > at=20 >=20 > org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker.java:= 1 19)=20 > at=20 >=20 > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor= . java:886)=20 > at=20 >=20 > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:= 9 08)=20 > at java.lang.Thread.run(Thread.java:662)=20 >=20 >=20 >=20 > Connect to ActiveMq Server again.=20 >=20 > code:=20 >=20 > String clientId =3D "mqtt_test";=20 > MqttClient client =3D new=20 > MqttClient("tcp://localhost:1883",clientId);=20 > CallBack callback =3D new CallBack();=20 > client.setCallback(callback);=20 > MqttConnectOptions conOptions =3D new=20 > MqttConnectOptions();=20 > conOptions.setUserName("mqttMessage");=20 >=20 > conOptions.setPassword("mqttMessage".toCharArray());=20 > conOptions.setCleanSession(false);=20 > client.connect(conOptions);=20 > String[] topics =3D {"topic.test","topic.test1","topic.test2"= };=20 > client.subscribe(topics);=20 >=20 > ActiveMq Server logs:=20 > WARN | Exception occurred processing:null: javax.jms.JMSException: Durable=20 > consumer is in use for client: mqtt_test and subscriptionName:=20 > mqtt_testtopic.test=20 > WARN | Failed to add Connection ID:alphae6400-4104-1372812313970-2:3,=20 > reason: javax.jms.InvalidClientIDException: Broker: localhost - Client:= =20 > mqtt_test already connected from null=20 >=20 > The Client(clientId:mqtt_test) can't connect to the AmqServer agian.=20 >=20 >=20 >=20 > --=20 > View this message in context:=20 > http://activemq.2283324.n4.nabble.com/Problem-about-Repeat-subscribe-messag= e -by-mqttv3-and-the-same-clientId-tp4668829.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com.=20 >=20 --=20 *Christian Posta*=20 http://www.christianposta.com/blog twitter: @christianposta=20 http://www.christianposta.com/blog=20 _____ =20 If you reply to this email, your message will be added to the discussion below: http://activemq.2283324.n4.nabble.com/Problem-about-Repeat-subscribe-messag= e -by-mqttv3-and-the-same-clientId-tp4668829p4669009.html=20 To unsubscribe from Problem about Repeat subscribe message by mqttv3 and th= e same clientId, click here. NAML =20 -- View this message in context: http://activemq.2283324.n4.nabble.com/Problem= -about-Repeat-subscribe-message-by-mqttv3-and-the-same-clientId-tp4668829p4= 669124.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. ------=_Part_369876_7884182.1373533391744--