Index Changes

Difference between version and version     

Back to Redelivery Enhancements, or Redelivery Enhancements Info


At line 5 changed 1 line.
QOS library implemented as decorator on JBI Delivery channel( com.sun.jbi.common.qos.messaging.MessagingChannel) keeps track on number of delivery attempts, and the error information associated with those invocations. It provides an API to query this information helps components making decision on retries. On completion of redelivery attempts component and QOS library share what is the due course for the Message Exchange (MEx). If user configured to "propagate error" or "suspend", component owns the responsibility. Otherwise namely "delete" or "error endpoint" QOS does the work and sends "Done" to component.
Redelivery QOS library implemented as decorator (com.sun.jbi.common.qos.messaging.BaseMessagingChannel) on JBI Delivery channel and implements interface com.sun.jbi.common.qos.messaging.MessagingChannel an extension to JBI Delivery channel.
At line 7 added 4 lines.
It keeps track on number of delivery attempts, and the error information associated with those invocations. It provides an API to query this information helps components making decision on retries. On completion of redelivery attempts component and QOS library share what is the due course for the Message Exchange (MEx). If user configured to "propagate error" or "suspend", component owns the responsibility. Otherwise namely "delete" or "error endpoint" QOS does the work and sends "Done" to component.
Component's ServiceUnitManager reads the QOS configuration from SU deployment descriptor (jbi.xml) using the utility from QOS module and sets on BaseMessagingChannel.
At line 8 changed 1 line.
It would be simple and easy if QOS library could take the complete responsibility for redelivery. Here are the thoughts
It would be simple and easy if QOS library could take the complete responsibility for redelivery both runtime and deployment.
At line 22 changed 2 lines.
!!Proposal - I
com.sun.jbi.common.qos.messaging.BaseMessagingChannel(decorator on DeliveryChannel) is defined in QOS. It is constructed in the ComponentLifeCycle.init method.
!! Proposals for runtime
At line 25 changed 2 lines.
Component's call DeliveryChannel.send(MessageExchange me)to send the message.
!!Proposal - I
At line 42 changed 1 line.
Add new operation send(MessageExchangeBuilder mb) to com.sun.jbi.common.qos.messaging.MessagingChannel (decorator on DeliveryChannel) interface defined in QOS.
Add new operation send(ExchangeTemplates et) to com.sun.jbi.common.qos.messaging.MessagingChannel interface defined in QOS. BaseMessagingChannel implements it. ExchangeTemplates interface is defined as:
{{{
public MessageExchange createExchange() throws MessagingException;
}}}
At line 44 changed 4 lines.
MessageExchangeBuilder interface is
public interface MessageExchangeBuilder {
public MessageExchange createMessageExchange(boolean failureOnFirstAttempt);
}
QoS provides a base implementation of this interface; it is the responsibility of the component to extend with the logic to create MEx, set input, associate properties, type of MEx (InOnly/InOut), attachments, security/subject and transaction. Component would pass the object of this type to MessagingChannel.send as a parameter.
At line 49 changed 1 line.
QOS could provide implementation of this interface, it would have the logic to create MEx, set input, associate properties, attachments, security/subject and transaction. Component would pass the object of this type to MessagingChannel .send as a parameter.
MessagingChannel.send delegates the call to DeliveryChannel.send with MEx object returned from callback method.
At line 51 changed 1 line.
MessagingChannel .send delegates the call to DeliveryChannel.send with MEx object returned from callback method.
MessagingChannel.accept would delegate to DeliveryChannel.accept, if the MEx received is set to error and there is room for retry, it calls ExchangeTemplates.createMessageExchange(). If this operation returns MessageExchange object, it proceeds with redelivery. If the callback method throws Exception, it would return errored MEx to component.
At line 53 removed 2 lines.
MessagingChannel.accept would delegate to DeliveryChannel.accept, if the MEx received is set to error and there is room for retry, it calls MessageExchangeBuilderObject.createMessageExchange(true). If this operation returns MessageExchange object, it proceeds with redelivery. If the callback method throws Exception, it would return errored MEx to component.
At line 61 changed 1 line.
Component needs to know new interface MessageExchangeBuilder, & MessagingChannel interface.
Component needs to know new interface ExchangeTemplates & MessagingChannel interface.
At line 63 added 6 lines.
!! Proposal for deployment
Component's ServiceUnitManager.init(), it could set SU name and SU path on BaseMessagingChannel. BaseMessagingChannel read the QOS configuration from descriptor instead of Component setting it.
!!! Include Throttling in QOS
QOS library can be enhanced to do Throttling. Should it pause the invokes from the component for given EP/SU when SU is stopped?

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-8) was last changed on 06-Aug-08 15:28 PM, -0700 by KevanSimpson