@Override public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent ce) throws Exception { if (!(ce instanceof MessageEvent)) { ctx.sendUpstream(ce); return; } MessageEvent e = (MessageEvent) ce; RedisConnection conn = (RedisConnection) e.getChannel().getAttachment(); ChannelBuffer cb = (ChannelBuffer) e.getMessage(); conn.replyFromBackend(cb.copy()); ctx.sendUpstream(ce); }