Closed bourtemb closed 5 years ago
There is also a problem because ZmqEventConsumer.checkZmqAddress() is not taking advantage of the additional info (channel names and heartbeat names) returned by C++ device servers using recent cppTango versions. ZmqEventConsumer.checkZmqAddress() is erasing this additional information.
@Ingvord , do you know whether this issue was fixed at some point in the past in the versions which were rolled back?
@bourtemb , I do not think so.
Bug is fixed. Will be available in JTango-9.5.14
Event reconnection problems can occur in the following conditions. A Java client has already subscribed to Tango events on a device server which is running on a host with several network interfaces and the first endpoint listed in the return value of ZmqEventSubscriptionChange is an endpoint on a network which is not accessible from the java client. In this case, the event reconnection does not work properly. It looks like a call similar to ZmqEventConsumer.checkZmqAddress() is missing in ZmqEventConsumer.reconnectToEvent() and ZmqEventConsumer.reconnectToChannel() methods.
ZmqEventConsumer.checkZmqAddress() is modifying the DeviceData which was returned by ZMQEventSubscriptionChange command and put an available endpoint as the first elements of the StringArray part of the DevVarLongStringArray DeviceData. These first elements are the ones (and only ones) which seem to be used by ZMQUtils.connectHeartbeat() and ZMQUtils.connectEvent() (more precisely by ZMQUtils.getBufferToConnectEvent() and ZMQUtils.getBufferToConnectHeartbeat() methods).