一台计算机已连接到solace,并且我希望另一台计算机已连接,但是它警告异常,如下所示:
org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:28)
org.eclipse.paho.client.mqttv3.internal.ClientState.notifyReceivedAck(ClientState.java:885)
org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:118)
java.lang.Thread.run(Unknown Source)
如果我断开一台计算机的连接,则另一台计算机可以连接.默认情况下是否只能连接一台计算机?如果是这样,如何设置它,以便许多机器都可以连接.
解决方法:
您的应用程序的两个实例都可能尝试使用相同的clientId进行连接.
MQTT协议要求每个客户端连接使用唯一的clientId.
3.1.3.1 Client Identifier
The Client Identifier (ClientId) identifies the Client to the Server. Each Client connecting to the Server has a unique ClientId. The ClientId MUST be used by Clients and by Servers to identify state that they hold relating to this MQTT Session between the Client and the Server [MQTT-3.1.3-2].
对于Solace系统实施,
- ClientIds can be up to 128 bytes in length
- ClientIds can contain any UTF-8 characters as allowed by Section 1.5.3
标签:paho,solace,java,mqtt 来源: https://codeday.me/bug/20191118/2029983.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。