Skip to main content

Posts

Showing posts with the label ESB

Get source IP address in the medaiation flow of WSO2 ESB

If ESB directly receiving a request message from the source, you can use following properties to extract source IP related info, <log level="custom"> <property xmlns:ns=" http://org.apache. synapse/xsd " name="REMOTE_ADDR" expression="$axis2:REMOTE_ ADDR"></property> <property xmlns:ns=" http://org.apache. synapse/xsd " name=" REMOTE_HOST " expression="$axis2:REMOTE_ HOST"></property> </log> If you have a proxy server or load balancer in the middle, You can use following property to extract IP address of the request source, <log level="custom"> <property xmlns:ns=" http://org.apache. synapse/xsd " name=" X-Forwarded-For " expression=" $trp:X-Forwarded-For" "></property> </log>

UUID Generation with WSO2 ESB

There are use cases which we need to generate a UUID( universally unique identifier ) from the WSO2 ESB server for the back end services. There are two commonly used UUID types, Version 1 UUID or Time UUID A Version 1 UUID use a scheme relying only on timestamp and the MAC address of the computer on which it is generated Version 4 UUID Version 4 UUIDs use a scheme relying only on random numbers Getting a version 4 UUID is really easy in ESB, since we already have one in the message flow. So we can extract it like follows, <property name="MessageID" expression="fn:substring-after(get-property('MessageID'), 'urn:uuid:')"/> But in case of version 1 UUID or Time UUID, we have to use script mediator or class mediator to generate a UUID . Script mediator is slower compared to the class mediator.  A simple class mediator which can use for version 1 UUID generation can be found here . This class mediator uses this library to gene...

WSO2 ESB 4.8.1 is the Fastest...

A resent performance study ESB Performance Round 7.5 shows that WSO2 ESB 4.8.1 outperforms all other open-source ESBs and keeps them in the dust as usual.