[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] questions about return value of update() method
> Hi, Marcel
> You had said that:
>>If a client wants to signal an error it should
>>throw an XmlBlasterException from update() with
>>In this case the message is redelivered.
> It is true to a java implementation client,but
> to a c++ client(has the same logic as the java client),
> it is useless.
> Is the java implementation different from c++
After looking into the code we think we must
enhance the error handling specification.
What about this approach:
Oneway messages can never respond a state back
to the server, so once the message is sent
the server handles it as delivered.
B) Acknowledged messages: String update() throws ...
If the update() method in the client code
throws an exception,
the message in the server is passed
to the error handler (which currently
sends it as a dead message).
C) If the server gets a communication exception
it assumes that the client has never seen
and retries to deliver it as configured.
The server side error handler is already hidden
by an interface and will one day in future be
a plugin. With such a plugin clients can throw
different types of "user.error.*" and the plugin
can handle it highly customizeable.
For example we could distinguish two client exception
a) The client has a recoverable problem and server
retries make sense in such a case
(for example OUT_OF_MEMORY Exception)
b) The client is buggy or missbehaving.
Here resending the message won't help (loop)
and the message should be passed to the
server side error handler (e.g. send as dead message)
For the time being you can enhance MsgErrorHandler.java
of you can subscribe on dead messages and handle them appropriate.
> pi_kyuan at cvicse.com