Can a sync message have an async message as a response instead of a reply message?

Viewed 84

The first picture shows the sync message exportDeclaration(id) waiting for a reply message download(file). The second picture, I used an async call as a response to the sync message exportDeclaration(id). I couldn't find anything to know which method is the right one.

enter image description here

enter image description here

1 Answers

Sure it can. When you send an async message it will not take notice of the receiver looking at it. It's fire and forget. A sychronous message has a direct response so you know the receiver got it. In case you expect not the result directly (but only the receipt confirmation) you can go on in the code and react to some later async message from the receiver of the message. It's just more difficult to implement but perfectly possible.

Related