SwitchYard provides support for network level integration with TCP and UPD protocols.
The TCP and UDP binding is built on top of camel-netty and supports most of options for this endpoint. Please refer camel documentation for detailed description of them.
Generic options
Following options can be apiled to <binding.tcp> and <binding.udp definition:
-
host
-
port
-
receiveBufferSize
-
sendBufferSize
-
reuseAddress
-
encoders
-
decoders
-
allowDefaultCodec
-
workerCount
-
sync
-
disconnect
TCP specific options
-
textline
-
tcpNoDelay
-
keepAlive
SSL Options
This endpoint supports SSL. Following parameters may be used to configure it:
-
ssl - turn on SSL
-
sslHandler - custom SSL Handler to use
-
passphrase - bean reference to String instance used to open KeyStore
-
securityProvider - name of Java security provider
-
keyStoreFormat
-
keyStoreFile - reference to File instance which is used loaded into java KeyStore
-
trustStoreFile - reference to File instance
-
sslContextParametersRef - if this parameter is specified it must be an bean reference to an instance of org.apache.camel.util.jsse.SSLContextParameters where you may specify all necessary parameters at once.
Binding Services with tcp/udp
Here's an example of what a file service binding looks like:
<sca:composite name="camel-binding" targetNamespace="urn:switchyard-quickstart:camel-binding:0.1.0">
<sca:service name="GreetingService" promote="GreetingService">
<camel:binding.tcp>
<camel:host>localhost</camel:host>
<camel:port>3939</camel:port>
<camel:allowDefaultCodec>false</camel:allowDefaultCodec>
<camel:sync>false</camel:sync>
</camel:binding.tcp>
<camel:binding.udp>
<camel:host>localhost</camel:host>
<camel:port>3940</camel:port>
<camel:allowDefaultCodec>false</camel:allowDefaultCodec>
<camel:sync>false</camel:sync>
</camel:binding.udp>
</sca:service>
</sca:composite>