The TCP Transport

The TCP transport allows clients to connect to a remote ActiveMQ broker using a TCP socket.

Configuration Syntax

tcp://hostname:port?key=value

Transport Options
Option Name Default Value Description
minmumWireFormatVersion 0 The minimum version wireformat that is allowed
trace false Causes all commands that are sent over the transport to be logged
daemon false Tells the transport thread to run as a daemon or not. Useful to enable when embedding in a Spring container or a web container to allow the container to shut down properly.
useLocalHost false When true, it causes the local machines name to resolve to "localhost".
socketBufferSize 64 * 1024 Sets the socket buffer size in bytes
keepAlive false When true, enables TCP KeepAlive on the broker connection. Useful to ensure that inactive consumers don't time out.
soTimeout 0 sets the socket timeout in milliseconds
connectionTimeout 30000 A non-zero value specifies the connection timeout in milliseconds. A zero value means wait forever for the connection to be established. Negative values are ignored.
wireFormat default The name of the WireFormat to use
wireFormat.\* All the properties with this prefix are used to configure the wireFormat. See Configuring Wire Formats for more information
closeAsync true The false value causes all sockets to be closed synchronously
soLinger MIN_INTEGER When > -1 causes the socket soLinger option to be enabled with this value. When == -1, causes soLinger to be disabled. (from 5.6.0)
maximumConnections Integer.MAX_VALUE The maximum number of sockets the broker is allowed to create
diffServ 0 client only) The preferred Differentiated Services traffic class to be set on outgoing packets, as described in RFC 2475. Valid integer values: [0,64). Valid string values: EF, AF[1-3][1-4] or CS[0-7]. With JDK 6, only works when the Java Runtime uses the IPv4 stack, which can be done by setting the java.net.preferIPv4Stack system property to be true. Cannot be used at the same time as the typeOfService option.
typeOfService 0 (client only) The preferred Type of Service value to be set on outgoing packets. Valid integer values: [0,256). With JDK 6, only works when the Java Runtime uses the IPv4 stack, which can be done by setting the java.net.preferIPv4Stack system property to be true. Cannot be used at the same time as the diffServ option
Example URI
tcp://localhost:61616?trace=false&soTimeout=60000
Differentiated Services or Types of Service

There is support for setting Differentiated Services - as outlined in IETF RCF 2475.
In order to configure the broker so that all outgoing packets from the broker match the DSCP values set on incoming packets - you will need to apply IP Tables scripts - found here.