Please find the below code which we use 

pipeline.addLast("backendConnector", backendConnector); --> OutboundHandler 
used to connect to the tunnel server
pipeline.addLast("readHandler", responseReadHandler); --> InboundHandler 
which logs the incoming message
pipeline.addLast("requestHandler", requestHandler); --> OutboundHandler
pipeline.addLast("proxy", interceptorHandler); --> InboundHandler
    

   Below is the code snippet for the backendConnector outbound handler
        
   @Override
   public synchronized void write(final ChannelHandlerContext ctx, Object 
msg, ChannelPromise promise)
                throws Exception {
            connectWithRetry(ctx, tunnelServerHost, tunnelServerPort, 3, 
new ChannelFutureListener(){
                public void operationComplete(final ChannelFuture future) 
throws Exception {
                    if (future.isSuccess()) {
                        ChannelPipeline pipeline = ctx.pipeline();
               
                        pipeline.addFirst("decode", new 
HttpResponseDecoder(4096, 8192, 131072));
                        pipeline.addFirst("encode", new 
HttpRequestEncoder());
                        //creating a sslHandler
                        pipeline.addFirst("ssl", sslHandler);
                        //custome code here
                    } else {
                        closeChannel("Failed to connect to backend 
channel", future);
                    }
                }
            });
        }

On Thursday, June 30, 2016 at 9:49:29 AM UTC+5:30, Norman Maurer wrote:
>
> Can you share some code?
>
> Also can you share the code that setup the pipeline?
>
> Am 30.06.2016 um 05:33 schrieb Mani Chaitanya <[email protected] 
> <javascript:>>:
>
> It does work till 4.0.19 but with latest releases from 4.0.20 to 4.1.1 it 
> does not work for us. 
> Also I forgot to mention that we have used maxChunkSize of 131072 for 
> HttpResponseDecoder. 
>
> On Wednesday, June 29, 2016 at 10:34:05 PM UTC+5:30, Norman Maurer wrote:
>>
>> Nothing I`m aware of… does it work with latest 4.0.x release ?
>>
>>
>> On 29 Jun 2016, at 18:50, Mani Chaitanya <[email protected]> wrote:
>>
>> When I upgraded the libraries from 4.0.19 to 4.1.1 version suddenly our 
>> tunnel client stopped working. We have a tunnel client which talks to the 
>> tunnel server (sends messages in chunked format) using netty channels with 
>> 4.0.19 libraries everything is working properly i.e when we send a request 
>> message from tunnel client to the tunnel server, server sends response 
>> which we print the number of bytes i.e 1000 bytes in our tunnel client but 
>> with 4.1.1 in our tunnel client it prints two 500 bytes messages. Nothing 
>> has changed on the tunnel server side. 
>>
>> The channelInbound handler used on the tunnel client when it receives the 
>> response from tunnel server will run in the below mentioned order
>>
>> 1. SslHandler
>> 2. HttpResponseDecoder
>> 3. HttpResponseLogger --> Here is the place where we print the number of 
>> bytes received.
>>
>> Is there any changes happened in 4.1.1 which is causing this? Any help is 
>> pretty much appreciated.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Netty discussions" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/netty/cc11ad1a-6cfd-4bab-a19e-ac439e6415ad%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/netty/cc11ad1a-6cfd-4bab-a19e-ac439e6415ad%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
> You received this message because you are subscribed to the Google Groups 
> "Netty discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/netty/b3ef9255-07de-4445-a258-55a153aa0fc5%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/netty/b3ef9255-07de-4445-a258-55a153aa0fc5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/77c6cfc6-a291-4b27-8f22-f2c755efe0e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to