Pivotal Knowledge Base


How to Increase Max Message Size for Syslog-TCP Source in Spring XD


 Product  Version
 Spring XD  Any


Spring XD shows the following error in the logs when using syslog-tcp source:

2017-02-07T11:19:51+0000 1.3.1.RELEASE ERROR pool-21-thread-17 connection.TcpNetConnection -
Read exception domain.example.com:42248:5143:abcd01de-1234-5678-ab3c-aabbcca122bd
IOException:Terminator '0xa' not found before max message length: xxxx


This message is shown because the max message size for syslog-tcp has been reached.


To increase buffer size, you need to perform the following steps:

  1. Edit syslog-tcp.xml that is located in $XD_HOME/modules/source/syslog-tcp/config.
  2. Locate bean with ID syslogDeserializer under profile rfc3164 (class ByteArrayLfSerializer).
  3. Add or edit the property maxMessageSize with a higher value than the current one.

The bean definition would look like following:

<beans profile="rfc3164"> <!-- aka BSD -->
<bean id="syslogDeserializer" class="org.springframework.integration.ip.tcp.serializer.ByteArrayLfSerializer" >
<property name="maxMessageSize" value="2048" />
</bean> </beans>

Adjust the value 2048 to a value that matches your requirements.

Additional Information

The default value for maxMessageSize is 2048.


Powered by Zendesk