Syslog-udp module is creating wrong timestamp fields (even another numeric fields are bad transformed)
Checking the output from Java Mission Control, we have seen that Spring Integration component udp-inbound-channel-adapter is used, and also DatagramPacketMessageMapper in method toMessage, and in here might be the problem in a concurrent environment, with different threads accessing some share variable.
Attatch a file, with the syslog entry sent in a loop, and different output obtained for the same entry.
We used a simple stream syslog-udp | file in a Spring XD single-node, and also failed in a distributed way.
org.springframework.integration.transformer.SyslogToMapTransformer#transform(String) is being invoked by multiple ip:udp-inbound-channel-adapter threads. This method is accessing SyslogToMapTransformer#dateFormat field implemented with SimpleDateFormat without any synchronization.
Although one can create new local SimpleDateFormat object or use ThreadLocal perhaps spring-integration-syslog should use a thread-safe formatter e.g. FastDateFormat from commons-lang?
Alvaro Vega opened INT-3715 and commented
Syslog-udp module is creating wrong timestamp fields (even another numeric fields are bad transformed)
Checking the output from Java Mission Control, we have seen that Spring Integration component
udp-inbound-channel-adapter
is used, and also DatagramPacketMessageMapper in method toMessage, and in here might be the problem in a concurrent environment, with different threads accessing some share variable.Attatch a file, with the syslog entry sent in a loop, and different output obtained for the same entry.
We used a simple stream
syslog-udp | file
in a Spring XD single-node, and also failed in a distributed way.Affects: 4.1.3
Attachments:
Referenced from: pull request #1443
Backported to: 4.0.8, 3.0.8
The text was updated successfully, but these errors were encountered: