Sie sind auf Seite 1von 3

Http Request - To invoke any webservices(REST based WS)

Web service Consumer(SOAP based WS)

Scheduler is to trigger some time-based event.


Fixed frequency and Cron Expressions
Scheduler is mainly used for batch processing.

http://localhost:8081/addTwoNumbers?Number1=25&Number2=30

Passing input in the request


-instead of hard coding the data we retreive it using query parameter
(attributes.queryParams.Number1)

Flows
=====

Flow
Sub Flow - doesnt contain Source option
Flow Reference

VMConnector

To publish and listen messages through vmconnector


-It handles the inter and intra app communication through asynchronous queue
we have Transient queue and persistent queue
-Transient queue is faster than persistent queue,but not reliable when there is
system crash
-Persistent queue are slower but reliable

For Each Scope-


Mainly used to split the payload
-it is done sequentially
to convert CSV file into java object we use transform message (o/p-Payload)
{converted in linkedhashMap}

Choice Router: Used to route messages(similar to if else loop)


it is basically a contant based routing
-There will be different routing options for the given choice it will use the
routing option where it is matched,When there is no routing matched it uses default
route
-To add more routes drag and drop inside the choice

Scatter and Gather


==================
- It is a routing event processor.
- We should have more than 1 event processor(atleast 2).
- It is done parallely
- Scatter means copying
- Parallel execution of routes increases efficiency of mule application

http://dummy.restapiexample.com/api/v1/employees

Mule 4 Indepth
API-Application program Interface
=================================

provides how to communicate with a software component during - operation(what to


call)
-Inputs(What to send with a call)
-Output(what to get back from a call)
-defines Functionality independent of implementations

Web Service
===========

Is a method of communication that allows 2 software systems to exchange data over


internet

2 main types of web services

SOAP
-Traditional,complex
-communication rules are defined in an xml baed wsdl file

RESTful WS( Representational State Transfer)


-Recent, simpler
-use existing HTTP communication protocol
-The http request method indicates which operation should be performed on the
object identified by url (POST,GET,DELETE,PUT,GET)

-Data and resources are represented using URIs


-GET retrieves the current state of a resource in some representation
-POST creates a new resource
-PUT replaces a resource completely
if resource doesn't exist,a new one is created
-PATCH updates a resource
Common HTTP status codes

200- OK
201- created
304- Not modified
400- Bad request
401- Unauthorized
404- Resource not found
500- Server error

Mule Event

-+Mule Message - data that passes through flows in the app

-++Attributes - Metadata contained in header

-++payload - The core info of the message the data the app processes

-Variables - Metadata for the mule event can be defined and referenced
in the app processing the evnt

DataWeave - An expression Language to access , query and transform mule4 event data
- Similar to JSON built just for data query and transformation use cases
- Fully integrated with flow designer and studio
Transform Component - input,output,preview sections with drag and drop and script
editors

RAML(Restful API Modeling Language)


-uses a human readable data serialization format where data structure hierarchy is
specified by indentation

- Resources are objects identified by web service URL


- All resources begin with a slash (/flights)
- For nested resource we add curly brackets({})(/{ID}:

API portals in exchange


-In private Exchange for internal developers
-In a public Portal for external developers
-API portals can be shared for both internal nd external users
-API portals are automatically created for REST APIs added to exchange

Das könnte Ihnen auch gefallen