You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Krull (JIRA)" <ji...@apache.org> on 2014/08/06 13:27:12 UTC
[jira] [Commented] (AMQ-4543) Client already connected error when
connecting to MQTT server a second time
[ https://issues.apache.org/jira/browse/AMQ-4543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14087567#comment-14087567 ]
Krull commented on AMQ-4543:
----------------------------
Hi!
I tried against 5.9.1 and the error is there.
What is the point of throwing an exception if a client tries to connect?
Yours
Felix
> Client already connected error when connecting to MQTT server a second time
> ----------------------------------------------------------------------------
>
> Key: AMQ-4543
> URL: https://issues.apache.org/jira/browse/AMQ-4543
> Project: ActiveMQ
> Issue Type: Bug
> Components: MQTT
> Affects Versions: 5.7.0
> Environment: Win 2008
> Reporter: Dorde Popovic
> Fix For: 5.9.0
>
>
> I built client that is connecting to Apache MQ set for mqtt.
> Now on first try client establishes the connection with client id = test1, sends message and closes connection
> if(!client.isConnected()){
> client.connect(conOpt);
> }
> MqttTopic topic = client.getTopic(topicName);
> MqttMessage message = new MqttMessage(payload);
> message.setQos(qos);
> MqttDeliveryToken token = topic.publish(message);
> token.waitForCompletion();
> client.disconnect();
> Then when again I run client it fails on connect ... I can see log in apache mq log:
> WARN | Transport Connection to: tcp://127.0.0.1:57354 failed: java.io.IOExcepti
> on: Broker: localhost - Client: test1 already connected from tcp://127.0.0.1:57
> 330
> in connection options I have set only setCleanSession(true). Paho client I have downloaded from site as stable version.
> I have first tried to raise an issue with the Eclipse Paho project (https://bugs.eclipse.org/bugs/show_bug.cgi?id=408105) and after investigation their team came to conclusion that this is not on clinet side
--
This message was sent by Atlassian JIRA
(v6.2#6252)