Project

General

Profile

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: java.net.SocketException: Connection closed by remote host
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.send(SocketConnector.java:821)
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.terminateStream(SocketConnector.java:1051)
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.stop(SocketConnector.java:1011)
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.stop(SocketConnector.java:1003)
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector.onErrorInThread(SocketConnector.java:544)
 at tigase.jaxmpp.j2se.connectors.socket.SocketConnector$Worker.run(SocketConnector.java:295)

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.

    (1-1/1)