Pubsyncwait

Hi,
I’m having problems using the pub.sync:wait service. I always get a time-out exception, even if the service is notified with the right key before the time limit.
I’m using IS 4.6.

Thks for your help.

Pls check this thread,if it helps.
http://www.wmusers.com/wmusers/messages/117/25723.shtml

Yeah, what a great post! :wink:

It sounds as if your threaded service is throwing an unhandled exception. The service never completes so it never has results to return in the notify step.

If the child process is a Flow service, use sequences to create a try-catch so that you can handle the exception and return some sort of status or completion code that the parent thread can inspect to determine whether the child service succeeded.

Mark

Thanks for your replies.

That’s exactly what I am doing: the parent service calls the child process and waits for a notification (using pub.sync:wait). The child process notify the parent service (using pub.sync:notify).
The problem is that the pub.sync:wait service is always throwing an exception, EVEN if the child process ended successfully before the time limit I defined for pub.sync:wait.

Assuming your properly handling exceptions thrown in the child process, I have also seen this happen when my child process did not notify the parent using the correct key.

The key specified on the pub.sync:notify must match exactly the key specified on the pub.sync:wait. A best practice is for this key to be unique within your given Integration Server instance.

If an incorrect key is used the parent will never receive the results of the child thread and will throw the timeout exception. In initial development, I usually write a message to a log file just before invoking the pub.sync:notify service.

Mark

Thanks for your help Mark. I’ve checked, I’m sending the correct key. I could reproduce the problem with a very simple configuration: one service using pub.sync:wait and another one using pub.sync:notify. The wait service is throwing the time out exception exactly when it receives the notification…

I have the answer: the parameter “value” of the notify service is required. Even if we don’t need to send data to the waiting service this parameter must be filled.

Yes, I think that the pub:sync:notify step itself would throw an exception if you didn’t give it a document (IData) called “value”.

Glad you found the problem, thanks for sharing the solution.

Mark