Monday 30 December 2013

Routing,Publish and Service Callout

When you are first starting with OSB it can be a little tricky to determine when to use a Route, Service Callout or a Publish node.  All three can be used to call either a Business service or a local Proxy service.  You can use the following lists to determine which will best fit your needs.

Route

    Last node in request processing.  It can be thought of as a bridge between request pipeline processing and the response pipeline processing.
    You can only execute one route in your Proxy Service.
    Can only be created in a route node.
    OSB will wait for the Route call to finish before continuing to process.
        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.

Service Callout

    Can have multiple Service Callout nodes in a Proxy service.
    Pipeline processing will continue after a Service Callout.
    Can be invoked from the request and/or response pipelines.
    Used to enrich the incoming request or outgoing response. For example, a call to get a country code.
    Used for real time request/response calls (Synchronous calls).
    OSB will hold a thread and not continue until the Service Callout completes.
    Can tie up resources and degrade performance under heavy loads.

Publish

    Can be synchronous or asynchronous
        If you are calling a business service with a Quality of Service of Best Effort , then it will be an asynchronous call.
        If you call a business service with a Quality of Service of Exactly Once or At Least Once, OSB will wait until the processing completes in the business service completes before proceeding and it is effectively a synchronous call.
        If you are calling a local proxy service, OSB will wait until the processing in the local proxy service completes and it is effectively a synchronous call.
    Can be invoked from the request and/or response pipelines.
    Best to use when you do not need to wait for a response from the process you are calling (Fire and Forget.... Asynchronous Calls)

No comments:

Post a Comment