I have a small external component thats sends a short message to a group chat. When executed, sometimes the message are delivered successfully to all room occupants, at other times only to some, and at some times even to none.
I've located the issue to arise in line 456 in ejabberd_router.erl, in do_route:
454 R = lists:nth(erlang:phash(Value, length(LRs)), LRs),
455 Pid = R#route.pid,
456 case R#route.local_hint of
457 {apply, Module, Function} ->
458 Module:Function(From, To, Packet);
459 _ ->
460 Pid ! {route, From, To, Packet}
461 end
When the message is successfully delivered to an occupant, the first case is matched. When it is just lost it is the second case thats executed, "Pid ! {route, From, To, Packet}". No more processing of this delivery can be found in the logs. The loglevel is set to 5.
Any ideas why this is happening (and why it seems to happen quite randomly)? And how to fix this?
Update: this seems to happen with messages from my component also when sent to ordinary users as well as to groupchats.
Also submitted to
Also submitted tohttps://support.process-one.net/browse/EJAB-1400