-
1. Re: ServiceInvoker.deliverSync and message redelivery
scottdawson Jun 2, 2009 9:51 AM (in response to year1997)The second parameter for deliverSync is a timeout value in milliseconds. What value are you passing?
See the javadoc for more info: http://www.jboss.org/jbossesb/docs/4.5.GA/javadoc/esb/org/jboss/soa/esb/client/ServiceInvoker.html
Regards,
Scott -
2. Re: ServiceInvoker.deliverSync and message redelivery
year1997 Jun 2, 2009 9:17 PM (in response to year1997)I am passing 5000L.
invoker.deliverSync(coreMsg, 2000L);
To my understanding, the second parameter is used for tiggering MessageDeliverException if no reply is received.
Regards,
Eddie -
3. Re: ServiceInvoker.deliverSync and message redelivery
year1997 Jun 3, 2009 12:14 AM (in response to year1997)Yeah, thank you. I got my problem solved.
The problem is caused by timeout setting.
The esb service is designed as:
Service 1 ->(5s timeout) Service 2 ->(2s timeout) Service 3
When timeout occurs in Service 2, Service 1 will get a exception from Service 2. Then, Service 1 will retry the request automatically.
So, duplicate requests will send from Service 1 to Service 2.
After I change it to
Service 1 ->(5s timeout) Service 2 ->(5s timeout) Service 3,
no more duplicate request in ESB.
However, a new problem will be raised in this design.
Let's say Service 3 commits while Service 2 is failed eventually.
How can I rollback the whole operation?
Thank you.