I took the code base and it seems that the subscription done using # or + is
not working. This is due to the issue in how the topic to handler works at
client side.
In the Client class code
private Map<String, IPublishCallback> m_subscribersList = new HashMap<String,
IPublishCallback>();
// in publishCallback
IPublishCallback callback = m_subscribersList.get(topic);
will not return any callBack handlers because the message sent from the broker
has the complete topic name.
The fix is quite straight forward
In SimpleMessangingSubject
under publish2Subscribers() method
if (qos == QOSType.MOST_ONE) {
//QoS 0
-- notify(new NotifyEvent(sub.getClientId(), topic, qos,
message, false));
++ notify(new NotifyEvent(sub.getClientId(), sub.getTopic(),
qos, message, false));
}
Original issue reported on code.google.com by moajiz on 20 Aug 2013 at 7:54
Original issue reported on code.google.com by
moajiz
on 20 Aug 2013 at 7:54