-
It looks like the issue is caused by cluster node not sending notifications about newly published items to other cluster nodes and other clients, those not receiving notifications, were connected to a different cluster node than publisher.
The issue is in version 5.0.0 of PubSub in clustered strategy and is caused by threading issue (notifications should be "registered" on the same node as item is published, while it is done be EventBus which uses different thread).
-
I've separated notification broadcast mechanism to separate class and in ACS-PubSub I've extended this new class to properly handle clustering.
The cause of the issue was the fact that
ClusteredNodeStrategy
usesThreadLocal
queues to collect all events which need to be forwarded to other cluster nodes as a result of a single PubSub request sent to PubSub component. Thanks to that, there is less traffic between cluster nodes.However, because we are using
ThreadLocal
there is a requirement to generate and add all those events from a single thread - the same thread which is processing request sent to the PubSub component, butEventBus
has it's own thread pool which are used for calling event handlers and a result, clustering mechanism was not working as expected (ThreadLocal queue for EventBus threads may grow and will never be flushed!).
Type |
Bug
|
Priority |
Normal
|
Assignee | |
Version |
tigase-server-8.2.0
|
Spent time |
0
|
One client (on one cluster node) publish item in PubSub node. Publisher receives message stanza with notification. Other subscribers (one different cluster nodes) doesn't receives messages. Subscribers can retrieve items, check subscription list, etc. When client subscribes to node it receives notification with latest published item, but when next item is published then notification is not coming.