Powered By Blogger

May 23, 2017

Understanding WSO2 ESB Mediation Flow

This blog post describes about the message flow of the synapse mediation engine and I hope this post will help to get a basic idea about the mediation flow. 

First the message comes to the transport layer and it takes care of the transport protocol transformations required by the ESB. The receiving transport selects a relevant message builder based on the message's content type and also before a transport sends a message out from the ESB, a message formatter is used to build the outgoing message.Then it passes to the synapse mediation engine and below flow shows the methods which will get executed in the request and response paths. 


Following methods will get executed in the Request flow

  • org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(MessageContext mc)
  • org.apache.synapse.mediators.base.SequenceMediator.mediate(MessageContext synCtx)
  • org.apache.synapse.mediators.AbstractListMediator.mediate(MessageContext synCtx, int)
  • org.apache.synapse.mediators.builtin.SendMediator.mediate(MessageContext synCtx)
  • org.apache.synapse.endpoints.AbstractEndpoint.send(MessageContext synCtx)
  • org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(EndpointDefinition endpoint, MessageContext synCtx)
  • org.apache.synapse.core.axis2.Axis2Sender.sendOn(EndpointDefinition endpoint, MessageContext synapseInMessageContext)
  • org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(EndpointDefinition endpoint, org.apache.synapse.MessageContext synapseOutMessageContext)
  • org.apache.axis2.engine.AxisEngine.send(MessageContext msgContext)

Below methods will get executed in the Response flow

  • org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(MessageContext messageCtx) 
  • org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(String messageID, MessageContext response, MessageContext synapseOutMsgCtx, AsyncCallback callback)
  • org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(MessageContext synCtx)
  • org.apache.synapse.mediators.base.SequenceMediator.mediate(MessageContext synCtx)
  • org.apache.synapse.mediators.AbstractListMediator.mediate(MessageContext synCtx, int)
  • org.apache.synapse.mediators.builtin.SendMediator.mediate(MessageContext synCtx)
  • org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(EndpointDefinition endpoint, MessageContext synCtx)
  • org.apache.synapse.core.axis2.Axis2Sender.sendBack(MessageContext smc)
  • org.apache.axis2.engine.AxisEngine.send(MessageContext msgContext)



Please find the proxy configuration below




<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="SampleProxy"
       startOnLoad="true"
       statistics="disable"
       trace="disable"
       transports="http,https">
   <target>
      <inSequence>
         <send>
            <endpoint>
               <address uri="http://www.mocky.io/v2/591b089c120000c3037788ae"/>
            </endpoint>
         </send>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>

                                

1 comment:

  1. Gambling online HD games are a lot of all the desire to play online games with all kinds of laziness. Gives you the most profitable online gambling player. In addition, we also have the prototype of the online game has a wide range of all the requirements for you to play online games with a lot of satisfaction. Golden slot In addition, we also have the means of playing online games met with a lot of craving. Have fun playing online casino games with all the excitement. The online casino game players have come together to create a desire for online entertainment with the highest quality. สล็อตออนไลน์ In addition, we also have an example of online gambling games very much. The user of online gambling games have come to terms with the various. Most of the online games are the most stressful every day. Online gambling players have come up with a lot of great needs, most of which are available 24 hours a day.

    ReplyDelete