I was puzzled by your reply.

Firstly, the xmlBlaster server doesnot handle the return result of Update method,
then it doesnot know when to redeliver the message to client. Here the main point is how to implement redelivery mechanism in xmlBlaster.


Of course, when client is down or crashed , the xmlBlaster server will try to reconnect to client, but not redeliver to client.

and what's the redelivery meachanism in xmlBlaster?

the modification in the last message is OK? or if implementation of redelivery mechanism in
xmlblaster, are there any other places must be modified?


thanks a lot!


From: Marcel Ruff <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [xmlblaster] questions about return value of update() method
Date: Mon, 25 Aug 2003 00:43:33 +0200

pikaiyuan wrote:
> Hi,everybody
>
> I want to use the xmlblaster as a mom in my work, and there is a
publish/subscribe scenario:
> There is a business logic which deals with the messages delivered from
the xmlbalster server in the update method of the subscriber, if the business logic returns false, maybe there has some errors in the deliveryed messages, and must be redelivered from the xmlblaster server.
>
> I had read the source file(CbDeliveryConnection.java),and the
return value is ignored.
Hi,

clients which can not process update messages should throw an

 update() ... {
   ...
   Global glob = updateKey.getGlobal();
   throw new XmlBlasterException(glob, ErrorCode.USER_UPDATE_ERROR, ...)
 }

see

http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.update.html

In this case the retries works as expected.


Note that the returned states (like RET_OK) are currently not
evaluated, they are reserved for the future transaction support,

regards

Marcel



>
> I want to add some redelivery controls in doSend method of
CbDeliveryConnection.java just like this:
> if (-1==address.getRetries())
> {
> int iRetriesCounter = 0;
> while (true)
> {
> rawReturnVal = cbDriver.sendUpdate(msgUnitRawArr);
> if
(rawReturnVal[0].equals(org.inforMessaging.util.enum.Constants.RET_OK)) break;
> iRetriesCounter ++;
> rawReturnVal = null;
>
> try {
Thread.currentThread().sleep(address.getPingInterval()); } catch (Exception e) { }
> }
> }
> else
> {
> for (int i=0; i<address.getRetries(); i++)
> {
> rawReturnVal = cbDriver.sendUpdate(msgUnitRawArr);
> if
(rawReturnVal[0].equals(org.inforMessaging.util.enum.Constants.RET_OK)) break;
> rawReturnVal = null;
> try {
Thread.currentThread().sleep(address.getPingInterval()); } catch (Exception e) { }
> }
> }
>
> Is any problem in my changes to the whole xmlblaster project? any
unknowable effect to other programs?
>
>    Any help is appreciated.
>    Thanks!
>
>
> pikaiyuan
> [EMAIL PROTECTED]
> 2003-08-24
>
>
>


-- http://www.xmlBlaster.org


_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com




Reply via email to