This content has been marked as final. Show 13 replies
Few questions: For how long does the DB is down? How often it happens? What is the frequency of the customer's requests?
One solution I can think about is, if the db invoke fails, catch it, and then you can put the messages into a Queue again.
But I didn't realy get into the whole picture.
Actually when the target system is down, there are two factors that need to be taken into consideration, order of delivery and guaranteed delivery. So, if we catch the messages and put them in a JMS queue, when the target system is up the message in the error queue needs to be manually moved in weblogic server to the queue from which the bpel process is polling. By that time the source system which is unaware that the target system is down will be sending te messages. So the order of delivery is lost.
From Naveen question the ACK is sent when the message is initially placed in the queue.
We will need to implement a similar setup.
Once the requesting application receives an ACK it should be 100% certain that the message will be reliable delivered and no longer has to worry about it.
The AIA/SOA/Weblogic infrastructure must be setup to either reliable deliver the message or if it fails generate an error and save the message in case it needs to be resubmitted.
Our DBA's tell us they may from time to time take systems offline for patching over a number of hours. It would be nice in this case for SOA to save the messages and deliver them when the maintenance period is over. This was something that attracted us to using queues.
1. To ensure delivery of messages to the target system in case of db/procedure inavailibility we can use BPEL Engines Recovery Configuration ( in the case the type of message would be Invoke).
2. To ensure that the messages are delivered in an order , we need to add ws-rm policy where we can set INOrder Delivery Assurance.
Yes Recovery can be Automated. Its very simple and easy. Below is a link from Oracle Documentation that explains in detail about the same.
Sections 11.2,11.3 in the link above will guide you doing a automated recovery.
Another blog about the same by Marc - http://orasoa.blogspot.in/2010/12/soa-11g-automatic-recovery.html
(Note: Be aware of the negative consequences of using this automated recovery as the faulted instances will keep on being submitted for recovery. So use MaxRecoverAttempt property to limit the number of times a instance need to be tried for recovery)
Thanks for Your reply.
Here i am facing two issues with automated recovery setting in em console.
1) When the target system is up, The new incoming messages are delivered before the recovered message are delivered. The "inorder delivery " is not achieved.
2) This property is not project specific.When we apply this setting in console it applies to all the projects. Is there any way we can make this setting project specific.
I'll try to put forward a solution. Happy to improve it by others.
Looking at your use-case, you have the following requirements
- Sequential processing of the messages (Unit-of-Order on JMS would have rescued you if you wouldn't have any concern about the performance)
- Less impact on Performance (that's why you do not want to use Sync process)
The solution could be
1.) Use a Mediator in front of your BPEL process B. This mediator will poll the messages from the JMS queue.
2.) Enable FIFO Resequencing on Mediator based on the group to which the multiple messages belong (identify this intelligently). e.g. if multiple PO updates are expected PO number can be a group ID. This will ensure that messages are fetched from the JMS and maintained in the Mediator Resequencer table.
3.) Call your BPEL process B from this Mediator synchronously so that it processes the next message of the group (say for a PO number) only after first message of that group is successfully completed.
4.) Mediator by default will call the BPEL process B independent of each group (e.g. PO1 has 3 messages and PO2 has 5 messages grouped in Mediator store, it will parallely create 2 instances one for PO1 and one for PO2). Hence optimizing the performance.
5.) However, I'm not sure that if the target system is not available or the message fails, would it resubmit the message or not? I think there should be some out of the box option for that. However, if it is not, automatic recovery should come to rescue as the case described in above thread wouldn't be encountered because it locks all the remaining messages of a group unless the first one is processed
You can arrive at a different variant as well based on the requirements.
For more info on resequencing see below
More information on Unit-Of-Order can be found at
How to configure Unit of order is explained here
For this to work with SOA, you'll have to create a synchronous connection to JMS queue which is explained as under.
Consuming jms queue synchronously in SOA11g
I was trying using the mediators(FIFO). I could see that its showing some impact on the performance. In ideal scenario, The 2nd message cannot be processed until the 1st message is processed. In ideal scenario, i want multiple messages to be processed at a single time.When the target system is down , once the target system comes up all the messages must be recoverable and must follow an inorder delivery.