Processor Chain Scope in Mule
A Processor Chain is a linear chain of message processors which process a message in order. A Processor Chain can be configured wherever a message processor appears in a Mule Schema.
flow of Processor Chain scope :
URL : http://localhost:8085/api/processorchain
Method : GET
When you hit the url logger output in console is :
XML project code :
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8085" basePath="/api" doc:name="HTTP Listener Configuration"/>
<http:request-config name="HTTP_Request_Configuration" host="reqres.in" doc:name="HTTP Request Configuration" basePath="/api" port="80"/>
<flow name="test_processorchainFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/processorchain" doc:name="HTTP"/>
<processor-chain doc:name="Processor Chain">
<logger message="logger 1" level="INFO" doc:name="Logger"/>
<vm:outbound-endpoint exchange-pattern="one-way" path="vmqueue" doc:name="VM"/>
<logger level="INFO" doc:name="Logger" message="logger 3"/>
</processor-chain>
</flow>
<flow name="test_processorchainFlow1">
<vm:inbound-endpoint exchange-pattern="one-way" path="vmqueue" doc:name="VM"/>
<logger message="logger 2" level="INFO" doc:name="Logger"/>
</flow>
</mule>
No comments:
Post a Comment