pub.publish:publishAndWait thread question

If you are using - pub.publish:publishAndWait service, does the thread remain open if you are waiting for a reply? does the service remain in run state.

It seems that if the “async” field is set to “true”, it seems that the thread is waiting. I just want to confirm.

well if “async” is set to true than it just publishes the document and finshed the rest of the step of that service so the tread shouldn’t remain open unless the steps following the “publishAndWait” step has some logic which keep the main flow service thread open.

Assuming that you actually want the reply since you issued a pub/wait then you are either going to block and wait at that point (set the timeout or it will wait forever) or you are going to do it asynch which means you are going to have to issue a waitForReply later in the service. Either way set the timeout on your pub/wait. The asynch option can be kind of powerful if you want to to some asynch publishing downstream(multiple hops) but eventually send the reply back to this service. The tag id makes it possible.