Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

HTTP-NIO transport is a module of the Apache Synapse project. Apache Synapse as well as WSO2 ESB ship the HTTP-NIO transport as the default HTTP transport implementation. The two classes that implement the receiver and sender APIs are org.apache.synapse.transport.nhttp.HttpCoreNIOListener and org.apache.synapse.transport.nhttp.HttpCoreNIOSender respectively. These classes are available in the JAR file named synapse-nhttp-transport.jar. This non-blocking transport implementation is one of the secrets behind the blistering performance figures of Apache Synapse and WSO2 ESB. The transport implementation is based on Apache HTTP Core - NIO and uses a configurable pool of non-blocking worker threads to grab incoming HTTP messages off the wire.

HTTP Relay Transport

Message Relay in the previous versions was simply a message builder-formatter pair (See Message Relay). You engage it on a per content type basis. Once engaged for a given content type, messages with that content type are streamed through the ESB. It ran on same old NHTTP transport.

The Relay transport (New in version 4.0) is an entire HTTP transport implementation based on HTTP Core NIO. This can be used as an alternative to the NHTTP transport. It doesn't really care about the content type and simply streams all received messages through. It's as if the old Message Relay was engaged on all possible content types. The new transport also has a simpler and cleaner model for forwarding messages back and forth.

To enable this, uncomment the relevant HTTP transport entries in the axis2.xml. Comment out also the usual settings for NHTTP transport receiver and sender.

...

Transport Receiver Parameters:

...

See more information in Transports.

Excerpt
hiddentrue

Description of HTTP-NIO transport in WSO2 ESB.