Comparing Publish, Routing and Service Callout actions in Oracle Service Bus
Publish Action
The Publish Action is best to use when you want to perform One-Way calls or Asynchronous Calls, but it can be used for synchronous calls too. You can use a Routing Options action to set the following properties to determing the Publich Action behaviour.
A Route Action is used when we want to perform a call to a Business Service. OSB picks a thread, creates a payload and transmits it to the destination. Then it releases the thread to execute other tasks, when the response arrives Weblogic assigns a different thread to continue the execution of work. In the meantime, the one who invoked OSB remains blocked, but OSB itself uses minimal threads for process execution.
When you add a Route action it must be the last node in the pipeline, JDeveloper does not permit the addition of another node after a Route Action.
Service Callout Action
The service callout action is to invoke multiple services within a single pipeline, in order to perform message enrichment, augmentation or validation, as part of a single orchestration. When performing service callouts OSB will hold a thread until a the response arrives. This can cause severe performance issues under heavy loads.
The Publish Action is best to use when you want to perform One-Way calls or Asynchronous Calls, but it can be used for synchronous calls too. You can use a Routing Options action to set the following properties to determing the Publich Action behaviour.
- When QoS is exactly-once, the publish action waits (blocking call) until the response from the target service is available, although the response itself is discarded. When the target is a business service, the publish action waits until the business service response is available. When the target is a proxy service, the publish action waits until the proxy service's response pipeline completes.
- When QoS is best-effort and the target service is a one-way proxy service or a one-way business service with retry count > 0, the publish action waits until the target service returns. With a one-way target service there is no response, but the publish action waits until the request is delivered.
- If the target proxy or business service is request-response or a one-way business service with retry count = 0, the publish action does not wait for the response (non-blocking call).
- If you are calling a Business service and you specify Best Effort for QoS (Quality of Service), then OSB will release the thread it is holding while the business service executes.
- If you are calling a Business service and you specify Exactly Once or At Least Once for QoS, then OSB will hold onto the thread while the business service executes.
- If you are calling a local Proxy service, then OSB will hold onto the thread until the Proxy service finishes executing.
A Route Action is used when we want to perform a call to a Business Service. OSB picks a thread, creates a payload and transmits it to the destination. Then it releases the thread to execute other tasks, when the response arrives Weblogic assigns a different thread to continue the execution of work. In the meantime, the one who invoked OSB remains blocked, but OSB itself uses minimal threads for process execution.
When you add a Route action it must be the last node in the pipeline, JDeveloper does not permit the addition of another node after a Route Action.
Service Callout Action
The service callout action is to invoke multiple services within a single pipeline, in order to perform message enrichment, augmentation or validation, as part of a single orchestration. When performing service callouts OSB will hold a thread until a the response arrives. This can cause severe performance issues under heavy loads.
Thank you Antonis for enlisting the differences between Routing and Service Callout.
ReplyDeleteMaybe it would also be worth to mention that the former modifies the $body too.