File forwarding to bypass polling
The default way to receive messages via the staged HTTP transport is Activator polling of the web server for inbound messages sent by partners. You can set up another way, where the web server forwards messages to Activator upon receipt. This bypasses polling and increases throughput, but opens a port into your trusted network.
To use forwarding, set up a staged HTTP transport for receiving messages in the community as though you are using the polling method. But also add an embedded HTTP server transport in the profile. The staged HTTP servlet forwards messages to the embedded server, but polling remains active with the staged HTTP transport. This provides failover protection. If a message cannot be forwarded because, for example, Activator server is not running, the message is retrieved once the server restarts and polls the web server.
To enable forwarding, configure the forwarding.xml file in the staged HTTP servlet’s conf directory. The following describes the elements in the file. You must delete or comment out unused elements.
- HTTP Info – The information for forwarding to an embedded HTTP server is placed within this element.
- uri="/SOMEMAILBOX" - The name of the mailbox created in the staged HTTP servlet user interface.
- class="com.cyclonecommerce.webmailbox.forwarding.HttpForwardingHandler" – The Java class for the forwarding function.
- <URL>http://node1:4080/exchange</URL> – This is the URL for connecting to the embedded HTTP server in Activator. The URL must be in the following format:
http://<host>:<port>/exchange/<community routing ID>
- You can copy most of the URL by looking up the embedded HTTP settings tab on the transport maintenance page in Activator user interface. The UI uses <machine> for <host> in the URL in lieu of a machine name because the Activator server may run on multiple computers. You must substitute the computer name. If the Activator server runs on multiple computers, use an HTTP Info element with a different host in the URL for each machine. An example of this set up is shown in the forwarding.xml file.
- <UserName>SOMEUSER</UserName> – If required, the user name for connecting to the embedded HTTP server.
- <Password>SOMEPASSWORD</Password> – If required, the password for connecting to the embedded HTTP server.
- <ProxyHost>MYPROXYHOST</ProxyHost> – If the staged HTTP server must connect through a proxy to the embedded server, the proxy name.
- <ProxyPort>8080</ProxyPort> – If the staged HTTP server must connect through a proxy to the embedded server, the proxy port.
- <ProxyUserName>SOMEPROXYUSER</ProxyUserName> – If the staged HTTP server must connect through a proxy to the embedded server, the user name to connect to the proxy.
- <ProxyPassword>SOMEPROXYPASSWORD</ProxyPassword> – If the staged HTTP server must connect through a proxy to the embedded server, the password to connect to the proxy.
- <ResponseTimeout>600000</ResponseTimeout> – The time in milliseconds the sender waits for a response before dropping the connection.
Related topics