@Override
public ConsumeOrderlyStatus consumeMessage(List<MessageExt> arg0, ConsumeOrderlyContext arg1) {
MessageExt msgRMQ = arg0.get(0);
Message msg = ONSUtil.msgConvert(msgRMQ);
MessageOrderListener listener = OrderConsumerImpl.this.subscribeTable.get(msg.getTopic());
if (null == listener) {
throw new ONSClientException("MessageOrderListener is null");
}
final ConsumeOrderContext context = new ConsumeOrderContext();
OrderAction action = listener.consume(msg, context);
if (action != null) {
switch (action) {
case ConsumeSuccessfully:
return ConsumeOrderlyStatus.SUCCESS;
case SuspendMoment: