Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Message Enricher With Mulesoft

Message Enricher With Mulesoft

Message Enricher With Mulesoft

Jitendra Bafna

May 01, 2017
Tweet

More Decks by Jitendra Bafna

Other Decks in Technology

Transcript

  1. Message Enricher Message Enricher is one of the important component

    with Mulesoft. There are various scenarios where you can use Message Enricher component. • When synchronizing data between data sources, you often check to see if a record already exists in the target resource • If you simply add an endpoint to query the target resource first before adding it, the response would become the payload – This is not what you want • You want the external call to act as an enrichment of the existing message with the original payload retained.
  2. How Message Enricher Works? • Enricher sends a copy of

    the original message into the processor • The original message waits • The copy is processed • The copy's response is a message • Part(s) of the response are added to part(s) of the original message • The enriched message moves forward.
  3. Message Enricher Implementation When determining if records exists in target

    system, it is common to store result in record variable.
  4. Message Enricher Implementation After determining the record exists in target

    system, you can use batch step filter to process only qualified records.
  5. Message Enricher Implementation • Create batch job to poll the

    database after specific interval of time with specific condition (e.g. postal code). • Add batch step and use Message Enricher to check if record exists in Salesforce (Account with same name) and store the result in record variable and retain the original payload. • Add second batch step with filter that allows only new records to be added in salesforce. • Use commit scope to process record in batch.