Understanding ejabberd pubsub behavior for 2 items published in parallel to different pubsub nodes

Hi all,

I was trying to publish 2 items in parallel, each item addressed to a different pubsub(each pub-sub containing 20,000 subscribers).
There is no overlap in the subscribers between pubsub1 and pubsub2.
Example of the 2 items being sent:-

<iq type="set" id="user-57dbac20e4b0f66c3fd7ef68-139-1474273681941"><pubsub xmlns="http://jabber.org/protocol/pubsub"><publish node="pubsub1"><item id="user-57dbac20e4b0f66c3fd7ef68-1-1474273681941"><X>1474273681933</X></item></publish></pubsub></iq>

<iq type="set" id="user-57dbac20e4b0f66c3fd7ef68-140-1474273681941"><pubsub xmlns="http://jabber.org/protocol/pubsub"><publish node="pubsub2"><item id="1user-57dbac20e4b0f66c3fd7ef68-2-1474273681941"><X>1474273681932</X></item></publish></pubsub></iq>

While I see that ejabberd recieves the publish call at the same time, the iq-response for these items arrives only one after another with a significant time-gap, say around 4 seconds.
For example
pub-sub 1:-
iq set time:- 2016/09/19 08:28:01.952
iq-response time:- 2016/09/19 08:28:06.657

pub-sub 2:-
iq set time:- 2016/09/19 08:28:01.952
iq response time:- 2016/09/19 08:28:10.690

This makes me believe that ejabberd is not doing parallel processing of the message.
Please help understand why ejabberd would behave this way when the messages are addressed to 2 different pub-sub nodes.

Syndicate content