Tags: WallarooLabs/pony-kafka
Tags
Mark connection as readable and read data on connect/reconnect Prior to this commit the CustomTCPConnectionHandler logic did not set the connection as readable and/or try to read data when a new connection or re-established connection occurred. This resulted in the behavior seen in WallarooLabs/wally#2281 as part of the 0.5.0 release of Wallaroo. This commit properly sets the connection as readable and tries to read data on a connect/reconnect. It also combines the connect and reconnect logic into a single if statement to avoid duplicating the same logic to make maintenance a bit easier.
Fix incorrect partial message detection threshold Prior to this commit, the logic to determine that a Kafka broker had returned a partial message was incorrectly calculating and checking for how much data needed to be available to decode a message. This would result in an "error decoding remaining message bytes" error if the size of the partial message was less than 4 bytes of the complete message. This commit resolves this bug by properly calculating and checking for how much data needs to be available for decoding a message.
Shutdown CustomTCPConnectionHandler whenever requested Previously, if we asked a CustomTCPConnectionHandler to shutdown, it would only shutdown if it wasn't receiving data. This PR updates CustomTCPConnectionHandler's close() to always do a hard close and immediately shut down the connection.