[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xmlblaster] SOCKET problem, why are messages delayed?


I've chosen XmlBlaster because of its wealth of features, simple tcp socket protocol support, compatibility and possible ease of use, and it looked good. However...
What i'm currently trying to write is a simple rpc framework in java for a quite complex commercial program being developed.
XmlBlaster is simply forwarding volatile PtP messages between two sessions. I've been trying to debug a problem for several days, after applying the ping patch for the SOCKET protocol.
The issue is that sometimes invocations of remote object's methods (on "host A") are not returning their return value, or rather, the messages don't arrive at "host B" immediately as "host A" sent published it. No other messages are being sent by any other host, traffic is zero.
This causes "host B" to get stuck in the invocation while waiting for the message containing the return value.
I noticed that when I wait 60 seconds, some warning messages appear on the xmlBlaster server:

[WARN XmlBlaster.DispatchWorkerPool.asus-1 requestBroker-/node/asus] Generating dead message 'callback:/node/asus/client/server/1/HIGH/1092849962617000000/rpc' from publisher=/node/asus/client/poka/1 because delivery with queue 'callback:/node/asus/client/server/1' failed: XmlBlasterException errorCode=[user.update.error] serverSideException=true location=[SOCKET-HandleClientRequest-server] message=[SOCKET callback of 1 messages failed : errorCode=resource.exhaust message=Timeout of 60000 milliseconds occured when waiting on update(server:6024) response. You can change it with -dispatch/callback/plugin/socket/responseTimeout <millis>] [See URL http://www.xmlblaster.org/xmlBlaster/doc/requirements/admin.errorcodes.listing.html#user.update.error]
[INFO XmlBlaster.DispatchWorkerPool.asus-1 XmlKey] DOM parsed the XmlKey __sys__deadMessage
[INFO XmlBlaster.DispatchWorkerPool.asus-1 TopicHandler-/node/asus/topic/__sys__deadMessage] New topic is ready, history/maxEntries=10, persistence/msgUnitStore/maxEntries=100000000
[WARN XmlBlaster.SOCKET.HandleClient-server SocketExecutor] Ignoring received 'update' message id=server:6024, nobody is interested in it

I don't understand the meaning of these messages, and assume that their appearance is not normal and has something to do with my problem.

My code to set up the connection to xmlBlaster on both clients is as follows:

String[] args = {
"-protocol", "SOCKET",
"-dispatch/connection/plugin/socket/hostname", host, "-dispatch/connection/plugin/socket/port", String.valueOf(port)};
Global global=new Global(args);
xmlBlasterConnection = global.getXmlBlasterAccess();

ConnectQos qos = new ConnectQos(global);

	Address address=new Address(global);

	CallbackAddress cba=new CallbackAddress(global, "SOCKET");


	if (session>=1)
        	qos.setSessionName(new SessionName(global, user+"/"+session));
        	qos.setSessionName(new SessionName(global, user));
        qos.loadClientPlugin("htpasswd", "1.0", user, pass);

        CallbackMultiplexer cbmpx=new CallbackMultiplexer();
        ConnectReturnQos crq=xmlBlasterConnection.connect(qos, cbmpx);

CallbackMultiplexer implements I_Callback.
I'm not using the get, subscribe or unsubscribe methods, only publishOneway. Receiving messages with CallbackMultiplexer.
Hope this helps to track down my error, misunderstanding or anything.

Any help is greatly appreciated.

Balázs Póka