You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by linuxcrazy <li...@126.com> on 2013/07/11 11:03:11 UTC
答复: Problem about Repeat subscribe message by mqttv3 and the same clientId
Thanks for your replay.
This problem has been fixed in ActiveMq(
Version:apache-activemq-5.9.0.redhat-610-20130705.003458-6).
_____
发件人: subscription-bounces+s2283324u375479@n4.nabble.com
[mailto:subscription-bounces+s2283324u375479@n4.nabble.com] 代表 ceposta
[via ActiveMQ]
发送时间: 2013年7月9日 5:18
收件人: linuxcrazy
主题: Re: Problem about Repeat subscribe message by mqttv3 and the same
clientId
Which client are you using? can you put together a small unit test that
shows this?
I cannot reproduce with the small test I tried.
On Wed, Jul 3, 2013 at 2:09 AM, linuxcrazy <[hidden email]> wrote:
> Client:mqttv3,Server:
> apache-activemq-5.9.0.redhat-610-20130702.003414-4-bin.zip
>
> code:
> String clientId = "mqtt_test";
> MqttClient client = new
> MqttClient("tcp://localhost:1883",clientId);
> CallBack callback = new CallBack();
> client.setCallback(callback);
> MqttConnectOptions conOptions = new
> MqttConnectOptions();
> conOptions.setUserName("mqttMessage");
>
> conOptions.setPassword("mqttMessage".toCharArray());
> conOptions.setCleanSession(false);
> client.connect(conOptions);
> String[] topics =
> {"topic.test","topic.test1","topic.test2","topic.test"};
> client.subscribe(topics);
>
>
> AMQ Server Errors:
> =======
> WARN | Async error occurred: javax.jms.JMSException: Durable consumer is
in
> use
> for client: mqtt_test and subscriptionName: mqtt_test topic.test
> javax.jms.JMSException: Durable consumer is in use for client: mqtt_test
> and
> subscriptionName: mqtt_test
> at
>
>
org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:1
23)
> at
>
>
org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java
:390)
> at
>
>
org.apache.activemq.broker.jmx.ManagedRegionBroker.addConsumer(ManagedRegion
Broker.java:229)
> at
> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)
> at
>
>
org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:
76)
> at
> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)
> at
> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)
> at
> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)
> at
>
>
org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilt
er.java:102)
> at
>
>
org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportC
onnection.java:619)
> at
> org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:347)
> at
>
>
org.apache.activemq.broker.TransportConnection.service(TransportConnection.j
ava:329)
> at
>
>
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnecti
on.java:184)
> at
>
>
org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:4
5)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTInactivityMonitor.onCommand(MQTTInact
ivityMonitor.java:147)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTTransportFilter.sendToActiveMQ(MQTTTr
ansportFilter.java:91)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTProtocolConverter.sendToActiveMQ(MQTT
ProtocolConverter.java:133)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onSubscribe(MQTTPro
tocolConverter.java:325)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onSubscribe(MQTTPro
tocolConverter.java:292)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTProtocolConverter.onMQTTCommand(MQTTP
rotocolConverter.java:167)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTTransportFilter.onCommand(MQTTTranspo
rtFilter.java:79)
> at
>
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.
java:83)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTCodec.processCommand(MQTTCodec.java:1
14)
> at
> org.apache.activemq.transport.mqtt.MQTTCodec.parse(MQTTCodec.java:84)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTNIOTransport.serviceRead(MQTTNIOTrans
port.java:105)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTNIOTransport.access$000(MQTTNIOTransp
ort.java:43)
> at
>
>
org.apache.activemq.transport.mqtt.MQTTNIOTransport$1.onSelect(MQTTNIOTransp
ort.java:66)
> at
>
>
org.apache.activemq.transport.nio.SelectorSelection.onSelect(SelectorSelecti
on.java:94)
> at
>
>
org.apache.activemq.transport.nio.SelectorWorker$1.run(SelectorWorker.java:1
19)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.
java:886)
> at
>
>
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)
> at java.lang.Thread.run(Thread.java:662)
>
>
>
> Connect to ActiveMq Server again.
>
> code:
>
> String clientId = "mqtt_test";
> MqttClient client = new
> MqttClient("tcp://localhost:1883",clientId);
> CallBack callback = new CallBack();
> client.setCallback(callback);
> MqttConnectOptions conOptions = new
> MqttConnectOptions();
> conOptions.setUserName("mqttMessage");
>
> conOptions.setPassword("mqttMessage".toCharArray());
> conOptions.setCleanSession(false);
> client.connect(conOptions);
> String[] topics = {"topic.test","topic.test1","topic.test2"};
> client.subscribe(topics);
>
> ActiveMq Server logs:
> WARN | Exception occurred processing:null: javax.jms.JMSException:
Durable
> consumer is in use for client: mqtt_test and subscriptionName:
> mqtt_testtopic.test
> WARN | Failed to add Connection ID:alphae6400-4104-1372812313970-2:3,
> reason: javax.jms.InvalidClientIDException: Broker: localhost - Client:
> mqtt_test already connected from null
>
> The Client(clientId:mqtt_test) can't connect to the AmqServer agian.
>
>
>
> --
> View this message in context:
>
http://activemq.2283324.n4.nabble.com/Problem-about-Repeat-subscribe-message
-by-mqttv3-and-the-same-clientId-tp4668829.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta
http://www.christianposta.com/blog
_____
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-message
-by-mqttv3-and-the-same-clientId-tp4668829p4669009.html
To unsubscribe from Problem about Repeat subscribe message by mqttv3 and the
same clientId, click
<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubs
cribe_by_code&node=4668829&code=bGludXhjcmF6eUAxMjYuY29tfDQ2Njg4Mjl8MTU0Mzgx
MjE1MQ==> here.
NAML
<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_
viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.Bas
icNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.templat
e.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant
_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
--
View this message in context: http://activemq.2283324.n4.nabble.com/Problem-about-Repeat-subscribe-message-by-mqttv3-and-the-same-clientId-tp4668829p4669124.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.