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!
publish/subscribe scenario: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
> There is a business logic which deals with the messages delivered fromthe 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.
>return value is ignored.
> I had read the source file(CbDeliveryConnection.java),and the
Hi,http://www.xmlblaster.org/xmlBlaster/doc/requirements/interface.update.html
clients which can not process update messages should throw an
update() ... { ... Global glob = updateKey.getGlobal(); throw new XmlBlasterException(glob, ErrorCode.USER_UPDATE_ERROR, ...) }
see
CbDeliveryConnection.java just like this:
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
> if (-1==address.getRetries())(rawReturnVal[0].equals(org.inforMessaging.util.enum.Constants.RET_OK)) break;
> {
> int iRetriesCounter = 0;
> while (true)
> {
> rawReturnVal = cbDriver.sendUpdate(msgUnitRawArr);
> if
> iRetriesCounter ++;Thread.currentThread().sleep(address.getPingInterval()); } catch (Exception e) { }
> rawReturnVal = null;
>
> try {
> }(rawReturnVal[0].equals(org.inforMessaging.util.enum.Constants.RET_OK)) break;
> }
> else
> {
> for (int i=0; i<address.getRetries(); i++)
> {
> rawReturnVal = cbDriver.sendUpdate(msgUnitRawArr);
> if
> rawReturnVal = null;Thread.currentThread().sleep(address.getPingInterval()); } catch (Exception e) { }
> try {
> }unknowable effect to other programs?
> }
>
> Is any problem in my changes to the whole xmlblaster project? any
> > Any help is appreciated. > Thanks! > > > pikaiyuan > [EMAIL PROTECTED] > 2003-08-24 > > >
-- http://www.xmlBlaster.org
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
