DataPower

DataPower

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  content based routing

    Posted 09/08/20 05:38 PM

    Below is the incoming request to datapower. Its a Json file and based package ID, we need to route to different backend URL.

    Json File:

    {

    "": "com.silanis.esl.packages.event.ESLProcessEvent",

    "name": "PACKAGE_COMPLETE",

    "sessionUser": "0787be84-f095-44c7-ba00-787093df86fc",

    "packageId": "U_KHiRfOXgKK0gpVWwwpFOSNy6o34=",

    "message": null,

    "documentId": null,

    "createdDate":"2018-01-29T17:00:59.449Z"

    }

    If packageId starts with "S", then route to some backed and If packageId starts with "U", then route data to some other backend



    #DataPower
    #Support
    #SupportMigration


  • 2.  RE: content based routing

    Posted 09/09/20 02:00 PM

    Hi,

    you can use for example GatewayScript to parse the JSON and then check if packageId starts with "S" or "U". You can then rewrite var://service/routing-url variable using the appropriate backend address. A bit more information can be found from knowledge center:

    https://www.ibm.com/support/knowledgecenter/SS9H2Y_7.7.0/com.ibm.dp.doc/var-service-routing-url_reference.html

    --Hermanni



    #DataPower
    #Support
    #SupportMigration