Thursday, April 16, 2015

Difference Between : Routing action Vs Service Callout Vs Publish action in OSB

Routing action:

  •  When you need to call a synchronous service then use it.
  • In the message flow, regardless of whether routing takes place or not, the route node represents the transition from processing a request to processing a response.
  • Always Last Node in Message Processing
  • Only one Route node in a Proxy
  • A Route Node indicates that Request Processing will end here and Response Processing will begin
  • At the route node, the direction of the message flow is reversed.
  • Routing action can be created inside a Route Node only


Service Callout :

  • When you need to call a synchronous service and want to save req and resp variable for validation and enrichment.
  • Service Callout is used in real time request-response scenarios (for sync response).
  • If you have a use case where you need to call one or multiple real time request-response services (like sync web-services) then you may use Service Callout action in the message flow. 
  • Being a synchronous call, the thread gets blocked until a response is returned from target service.
  • Can have multiple Service Callout nodes in a Proxy service


Publish action :

  • Publish action is used for Request only scenarios where you don't expect a response back
  • The nature of Publish action (sync or async) will depend upon the target service you are invoking.
  • If you are invoking an external service through a business service then Publish action with Quality of Service(QoS) as "Best Effort" (default) will work like fire and forget and thread won't get blocked (async call). 
  • If you are invoking a local proxy service (proxy with transport protocol as "local") from another proxy using publish action then it would be a blocking call (synchronus call) and thread will get blocked untill the processing of local proxy finishes.


ref. - https://community.oracle.com/thread/1774545





1 comment: