@Test public void testProcessRequest_NoMsgInQueue() throws RemotingCommandException { GetMessageResult getMessageResult = createGetMessageResult(); getMessageResult.setStatus(GetMessageStatus.NO_MESSAGE_IN_QUEUE); when(messageStore.getMessage(anyString(), anyString(), anyInt(), anyLong(), anyInt(), any(ExpressionMessageFilter.class))).thenReturn(getMessageResult); final RemotingCommand request = createPullMsgCommand(RequestCode.PULL_MESSAGE); RemotingCommand response = pullMessageProcessor.processRequest(handlerContext, request); assertThat(response).isNotNull(); assertThat(response.getCode()).isEqualTo(ResponseCode.PULL_OFFSET_MOVED); }
@Override public RemotingCommand processRequest(final ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { return this.processRequest(ctx.channel(), request, true); }
PullMessageProcessor extends AsyncNettyRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(final ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { return this.processRequest(ctx.channel(), request, true); } }
PullMessageProcessor extends AsyncNettyRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(final ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { return this.processRequest(ctx.channel(), request, true); } PullMessageProcessor(final BrokerController brokerController); }
PullMessageProcessor extends AsyncNettyRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(final ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { return this.processRequest(ctx.channel(), request, true); } PullMessageProcessor(final BrokerController brokerController); @Override RemotingCommand processRequest(final ChannelHandlerContext ctx,
        RemotingCommand request); @Override boolean rejectRequest(); boolean hasConsumeMessageHook(); void executeConsumeMessageHookBefore(final ConsumeMessageContext context); void executeRequestWhenWakeup(final Channel channel,
        final RemotingCommand request); void registerConsumeMessageHook(List<ConsumeMessageHook> sendMessageHookList); }
PullMessageProcessor extends AsyncNettyRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(final ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { return this.processRequest(ctx.channel(), request, true); } PullMessageProcessor(final BrokerController brokerController); @Override RemotingCommand processRequest(final ChannelHandlerContext ctx,
        RemotingCommand request); @Override boolean rejectRequest(); boolean hasConsumeMessageHook(); void executeConsumeMessageHookBefore(final ConsumeMessageContext context); void executeRequestWhenWakeup(final Channel channel,
        final RemotingCommand request); void registerConsumeMessageHook(List<ConsumeMessageHook> sendMessageHookList);  }