For BE/B.Tech/BCA/MCA/ME/M.Tech Major/Minor Project for CS/IT branch at minimum price Text Message @ 9424820157

Message Source & Message Processors in Mule

  Message Source & Message Processors in Mule





Message Source : Message source accepts message from external source and triggers the flow to execute.Message sources are basically connectors like HTTP,FTP,Database,etc.


Message Source is a concept used in Mule ESB application from version 3.x backward, is the important part. In this tutorial, I will share with you all detail about this concept.

In a Mule ESB application, Message Source will be a component create new Mule Message from receiving or retrieving data from other systems. After creating a Mule Message, this message will be processed by one or more Message Processors.

Example, if we have an HTTP Listener Connector in Message Source, this connector will be a component to other systems can call to our Mule ESB application and pass the data.

And if Database Connector in Message Source, when we run our Mule ESB application, this connector will connect to the database and get the data base on the configuration to create Mule Message.


In Anypoint Studio IDE, if you look at Flow Editor, you will see the Message Source in the first part of a Flow.

In a Flow of Mule ESB application, we only have one Message Source.

Mule ESB supports many types of Message Source:

Inbound Endpoints
Polls
Custom Message Sources


These are the Connectors that we can call them, making our Mule ESB application in a passive position. It means that when using these connectors, our Mule ESB application must wait for the third party to call before creating the Mule Message.

Message Processor : It manipulates the message like transforming,filtering,enriching,etc.Processors are like transform message, filters,validators,etc.


After Mule receives a message from a Message Source, it uses one or more message processors to process the message through a flow.

These can transform, filter, enrich, and otherwise process the message as it transitions through your flow.

Message Processors can be categorized by function as follows:

Connectors send and receive data, and plug into external data sources via standard protocols or third-party APIs.

Components are flexible tools which perform business logic implemented in Java, Javascript, Groovy, Python, or Ruby.

Filters only allow certain messages to continue to be processed in a flow based on certain criteria.

Routers control message flow to route, resequence, or split and aggregate messages in a flow.

Scopes wrap snippets of code to define fine-grained behavior within a flow.

Transformers convert message payload type and data format to facilitate communication between systems.

Exception Strategies handle any errors that occur during message processing.



Business Events capture data related to key performance indicators.


for a mule flow to compile a flow must have a message processor(message source is optional).



In Above figure HTTP connector is message source because it listens the request from external source and rest of components are message processors.Here,


logger : logs request on console.
Transform message : transform format from one form to another(eg. xml to json)

Set Payload : Sets data or body.


No comments:

Post a Comment



Please go through below tutorials:


Mule 4 Tutorials

DEPLOY TO CLOUDHUB C4E CLIENT ID ENFORCEMENT CUSTOM POLICY RABBIT MQ INTEGRATION
XML TO JSON WEBSERVICE CONSUMER VM CONNECTOR VALIDATION UNTIL SUCCESSFUL
SUB FLOW SET & REMOVE VARIABLE TRANSACTION ID SCATTER GATHER ROUND ROBIN
CONSUME REST WEBSERVICE CRUD OPERATIONS PARSE TEMPLATE OBJECT TO JSON LOAD STATIC RESOURCE
JSON TO XML INVOKE IDEMPOTENT FILTER FOR EACH FLAT TO JSON
FIXWIDTH TO JSON FIRST SUCCESSFUL FILE OPERATIONS EXECUTE ERROR HANDLING
EMAIL FUNCTIONALITY DYNAMIC EVALUATE CUSTOM BUSINESS EVENT CSV TO JSON COPYBOOK TO JSON
CHOICE ASYNC

Widely used Connectors in Mule 3

CMIS JETTY VM CONNECTOR SALESFORCE POP3
JMS TCP/IP WEBSERVICE CONSUMER QUARTZ MONGO DB
FILE CONNECTOR DATABASE CONNECTOR


Widely used Scopes in Mule 3

SUB FLOW REQUEST REPLY PROCESSOR CHAIN FOR EACH CACHE
ASYNC TCP/IP COMPOSITE SOURCE POLL UNTIL SUCCESSFUL
TRANSACTIONAL FLOW

Widely used Components in Mule 3

EXPRESSION CXF SCRIPT RUBY PYTHON
JAVASCRIPT JAVA INVOKE CUSTOM BUSINESS EVENT GROOVY
ECHO LOGGER


Widely used Transformers in Mule 3

MONGO DB XSLT TRANSFORMER REFERENCE SCRIPT RUBY
PYTHON MESSAGE PROPERTIES JAVA TRANSFORMER GZIP COMPRESS/UNCOMPRESS GROOVY
EXPRESSION DOM TO XML STRING VALIDATION COMBINE COLLECTIONS BYTE ARRAY TO STRING
ATTACHMENT TRANSFORMER FILE TO STRING XML TO DOM APPEND STRING JAVASCRIPT
JSON TO JAVA COPYBOOK TO JSON MAP TO JSON JSON TO XML FLATFILE TO JSON
FIXWIDTH TO JSON CSV TO JSON


Widely used Filters in Mule 3

WILDCARD SCHEMA VALIDATION REGEX PAYLOAD OR
NOT MESSAGE PROPERTY MESSAGE IDEMPOTENT FILTER REFERNCE
EXPRESSION EXCEPTION CUSTOM AND


Exception Strategy in Mule 3

REFERENCE EXCEPTION STRATEGY CUSTOM EXCEPTION STRATEGY CHOICE EXCEPTION STRATEGY CATCH EXCEPTION STRATEGY GLOBAL EXCEPTION STRATEGY


Flow Control in Mule 3

CHOICE COLLECTION AGGREGATOR COLLECTION SPLITTER CUSTOM AGGREGATOR FIRST SUCCESSFUL
MESSAGE CHUNK AGGREGATOR MESSAGE CHUNK SPLITTER RESEQUENCER ROUND ROBIN SOAP ROUTER