Changing the Default Transport¶
APIs are made up of Apache Synapse configurations that MWARE ESB accesses through a transport protocol. The default ESB transport is the PassThrough transport, but you can configure a different default transport in your deployment.toml
file.
Info
MWARE ESB does not use the HTTP/S servlet transport protocol configurations that are in the axis2.xml
file. Instead, MWARE ESB's Management Console uses the Tomcat-level servlet transport protocols that are available in the <API-M_HOME>/repository/conf/tomcat/catalina-server.xml
file.
The following topics provide more information on these transports:
- HTTP PassThrough Transport
- Transport Receiver Parameters
- Transport Sender Parameters
- Connection Throttling
HTTP PassThrough Transport¶
HTTP PassThrough Transport is the default, non-blocking HTTP transport implementation based on HTTP Core NIO and is specially designed for streaming messages. It is similar to the old message relay transport, but it does not take the content type into consideration and simply streams all the messages that it receives. It also has a simpler and cleaner model for forwarding messages back and forth. The two classes that implement the receiver and sender APIs are org.apache.synapse.transport.passthru.PassThroughHttpListener
and org.apache.synapse.transport.passthru.PassThroughHttpSender
, respectively. The PassThrough Transport does not require the binary relay builder and expanding formatter.
Transport Receiver Parameters¶
Parameter Name |
Description |
Required |
Possible Values |
Default Value |
---|---|---|---|---|
port |
The port on which this transport receiver should listen for incoming messages. |
No |
A positive integer less than 65535 |
8280 |
non-blocking |
Setting this parameter to true is vital for reliable messaging and a number of other scenarios to work properly. |
Yes |
|
|
bind-address |
The address of the interface to which the transport listener should bind. |
No |
A host name or an IP address |
127.0.0.1 |
WSDLEPRPrefix |
A URL prefix which will be added to all service EPRs and EPRs in WSDLs etc. |
No |
A URL of the form <protocol>://<hostname>:<port>/ |
|
httpGetProcessor |
An extension point used to execute a special interceptor for HTTP GET requests. |
Yes |
An extension point |
|
priorityConfigFile |
The location of the file containing the configuration for priority based dispatching. |
No |
A file location |
Transport Sender Parameters¶
Parameter Name |
Description |
Required |
Possible Values |
Default Value |
---|---|---|---|---|
non-blocking |
Setting this parameter to true is vital for reliable messaging and a number of other scenarios to work properly. |
Yes | true or false |
true |
warnOnHTTP500 | Logs warnings for HTTP 500 responses only for the specified content-types. For example,
|
No | A list of content types separated by "|" | |
http.proxyHost |
If the outgoing messages should be sent through an HTTP proxy server, use this parameter to specify the target proxy. |
No |
A host name or an IP address |
|
http.proxyPort |
The port through which the target proxy accepts HTTP traffic. |
No |
A positive integer less than 65535 |
|
http.nonProxyHosts |
The list of hosts to which the HTTP traffic should be sent directly without going through the proxy. |
No |
A list of host names or IP addresses separated by '|' |
Connection Throttling¶
Using the HTTP PassThrough transport protocol, you can enable connection throttling to restrict the number of simultaneous open connections. To enable connection throttling, edit the <APIM_HOME>/repository/conf/deployment.toml
and add the following configuration under passthough_http
configurations.
[passthru_http]
max_open_connections = 2
This will restrict simultaneous open incoming connections to 2. To disable throttling, delete the max_open_connections
setting or set it to -1.
Info
Connection throttling is never exact. For example, setting this property to 2 will result in roughly two simultaneous open connections at any given time.
The following configurations should be added to the deployment.toml file in order to apply the changes
HTTP Transport Receiver Parameters
[transport.passthru_http.listener.parameters]
port=7003
HTTP Transport Sender Parameters
[transport.passthru_http.sender.parameters]
non-blocking=false
HTTPS Transport Receiver Parameters
[transport.passthru_https.listener.parameters]
port=7003
HTTPS Transport Sender Parameters
[transport.passthru_https.sender.parameters]
non-blocking=false