Batch pubsub Exception

shir Hu
Added almost 4 years ago

I have some questions about use pubsub batch.

1.Use module.subscribe() to subscribe node batch, source code as follow:

 for(int i=12132;i<27977;i++){
   JID subscriberJID = JID.jidInstance("irene"+i+"@shir-pc");
   module.subscribe(pubSubJID, nodeName, subscriberJID,new SubscriptionAsyncCallback() {...});

About 600 success results , Exception occur as follow:

tigase.jaxmpp.core.client.exceptions.JaxmppException: Connection closed by remote host
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.send(
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.terminateStream(
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.stop(
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.stop(
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.onErrorInThread(
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector$

2.Batch create nodes also occur exception above, source code as follow:

    for(int i=0;i<1000000;i++){
        module.createNode(BareJID.bareJIDInstance(pubSubDomain), "testNode"+i,new PubSubAsyncCallback() {...});

3.Batch publish items, about 12,000 subscribers this node, Occur time out error, source code as follow:

    for(int i=0;i<10000;i++){
        module.publishItem(bareJID, nodeName, "itemId_00"+i, entry,new PubSubAsyncCallback() {...});

Is anything wrong to call it or some limits on this?

Replies (1)

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

There are some throttling mechanisms in Tigase:

Given that you have very high connection rate I would suggest trying to adjust the settings.