private void handleRequest ( final ChannelHandlerContext ctx , final ByteBuf message ) { if ( isDataMessage ( message ) ) { dataEventHandler . onEvent ( flowController , message ) ; } else if ( isControlMessage ( message ) ) { controlHandler . onEvent ( flowController , message ) ; } else if ( DcpNoopRequest . is ( message ) ) { try { ByteBuf buffer = ctx . alloc ( ) . buffer ( ) ; DcpNoopResponse . init ( buffer ) ; MessageUtil . setOpaque ( MessageUtil . getOpaque ( message ) , buffer ) ; ctx . writeAndFlush ( buffer ) ; } finally { message . release ( ) ; } } else { try { LOGGER . warn ( "Unknown DCP Message, ignoring. \n{}" , MessageUtil . humanize ( message ) ) ; } finally { message . release ( ) ; } } }
Dispatch incoming message to either the data or the control feeds .