There is big problem of already connected client error in AMQ MQTT.
As per MQTT specification, existing connection should get disconnected if
another client connects with same "CLIENTID".
Should I call deleteDurableSubs ? How can I SubscriptionInfo from ClientID ?
public void deleteDurableSubs(List<SubscriptionInfo> subs) {
try {
for (SubscriptionInfo sub : subs) {
RemoveSubscriptionInfo rsi = new RemoveSubscriptionInfo();
rsi.setConnectionId(connectionId);
rsi.setSubscriptionName(sub.getSubcriptionName());
rsi.setClientId(sub.getClientId());
sendToActiveMQ(rsi, new ResponseHandler() {
@Override
public void onResponse(MQTTProtocolConverter converter,
Response response) throws IOException {
// ignore failures..
}
});
}
} catch (Throwable e) {
LOG.warn("Could not delete the MQTT durable subs.", e);
}
}
--
View this message in context:
http://activemq.2283324.n4.nabble.com/Disconnect-subscriber-with-clientID-MQTT-tp4680611.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.