Reputation: 814
I'm working with an existing Java server that uses Netty 4.1 to receive a proprietary protocol. Occasionally, the downstream system to which these messages must be passed will not be able to accept them. When this occurs, an exception will be thrown in my pipeline. Under these circumstances, rather than implement my own recovery mechanism, I'd prefer to take advantage of the fact that the (existing) client will resend messages for which TCP ACK is not received.
Is such a scheme possible with netty, and if so, how should I implement my pipeline to achieve this? All the ChannelHandler implementations in my pipeline run in the parent group, as their operation is acceptably fast.
Upvotes: 1
Views: 428
Reputation: 123260
TCP ACK is a transport layer mechanism to acknowledge that the data was successfully received at the recipient. What you want in your use case is an application layer mechanism to acknowledge that the data were successfully processed by the application (which includes forwarding it to another step in the pipeline).
These are completely different things, i.e. success of data delivery vs. data processing. There is no API to (mis)use the first for the latter, i.e. you need to implement your own (application level) mechanism.
Upvotes: 3