There are several ways that we can invoke target service in OSB.
1. Service callout
2. Routing
3. Publish
We use Publish action when you don't need to wait for the response from target service like JMS queue, producing files or invoking one way services.(kind of fire and forget)
If we use the publish action, even though there is some error in the target service it will not stop the flow. Our flow will just move on to the next activity in the pipeline.
But in some cases we do need to handle the exception in publish, like if the webservice is down.
To catch the error, we need to add Routing Options under publish and make the quality of service to "Exactly once".
Publish with "exactly once" is architecturally equivalent to synchronous service invocation and it will be no longer a "fire and forget" invocation.
Publish action will become Synchronous call in one another case as well, if we are invoking another OSB proxy service (on Local, or on HTTP) the thread will be blocked until we get the response.
1. Service callout
2. Routing
3. Publish
We use Publish action when you don't need to wait for the response from target service like JMS queue, producing files or invoking one way services.(kind of fire and forget)
If we use the publish action, even though there is some error in the target service it will not stop the flow. Our flow will just move on to the next activity in the pipeline.
But in some cases we do need to handle the exception in publish, like if the webservice is down.
To catch the error, we need to add Routing Options under publish and make the quality of service to "Exactly once".
Publish with "exactly once" is architecturally equivalent to synchronous service invocation and it will be no longer a "fire and forget" invocation.
Publish action will become Synchronous call in one another case as well, if we are invoking another OSB proxy service (on Local, or on HTTP) the thread will be blocked until we get the response.
No comments:
Post a Comment