HI ,Dele
Is there a bug in the org.jivesoftware.openfire.spi.RoutingTableImpl.routeToComponent(JID jid, Packet packet, boolean routed) ,in code line
“routed = remotePacketRouter.routePacket(nodeID.toByteArray(), jid, packet);”
I found the code line “Set nodes = componentsCache.get(jid.getDomain());”
returns two key-values when openfire running in cluster.
first ,the cache componentsCache.put(address, nodes) called when openfire start up ,
for example ,
the XMPPServer NodeID is DEFAULT_NODE_ID = NodeID.getInstance(new byte[0]).
Then the valus changed when openfire jion a cluster,
the cache componentsCache.put(address, nodes) called again .
Therefore ,
the code line “Set nodes = componentsCache.get(jid.getDomain());”
returns two key-values for every component,
the first value is DEFAULT_NODE_ID ,that is 0 byte,second is the machine name after jion a cluster.
So, code line "for (NodeID nodeID : nodes) " get the first value DEFAULT_NODE_ID , nodeID.toByteArray() is null ,
That is “routed = remotePacketRouter.routePacket(nodeID.toByteArray(), jid, packet);”
will get Exception ,said target= null etc.
the second Nodeid value will not execute.
thanks !