Java Code Examples for org.apache.rocketmq.broker.transaction.OperationResult#setResponseCode()
The following examples show how to use
org.apache.rocketmq.broker.transaction.OperationResult#setResponseCode() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TransactionalMessageServiceImpl.java From rocketmq-4.3.0 with Apache License 2.0 | 5 votes |
private OperationResult getHalfMessageByOffset(long commitLogOffset) { OperationResult response = new OperationResult(); // 根据offset查询消息=》 MessageExt messageExt = this.transactionalMessageBridge.lookMessageByOffset(commitLogOffset); if (messageExt != null) { response.setPrepareMessage(messageExt); response.setResponseCode(ResponseCode.SUCCESS); } else { response.setResponseCode(ResponseCode.SYSTEM_ERROR); response.setResponseRemark("Find prepared transaction message failed"); } return response; }
Example 2
Source File: EndTransactionProcessorTest.java From rocketmq-4.3.0 with Apache License 2.0 | 5 votes |
private OperationResult createResponse(int status){ OperationResult response = new OperationResult(); response.setPrepareMessage(createDefaultMessageExt()); response.setResponseCode(status); response.setResponseRemark(null); return response; }
Example 3
Source File: TransactionalMessageServiceImpl.java From rocketmq-read with Apache License 2.0 | 5 votes |
/** * 获取halfMessage通过偏移量 * @param commitLogOffset ; * @return ; */ private OperationResult getHalfMessageByOffset(long commitLogOffset) { OperationResult response = new OperationResult(); //通过偏移量获取preparemessage MessageExt messageExt = this.transactionalMessageBridge.lookMessageByOffset(commitLogOffset); if (messageExt != null) { response.setPrepareMessage(messageExt); response.setResponseCode(ResponseCode.SUCCESS); } else { response.setResponseCode(ResponseCode.SYSTEM_ERROR); response.setResponseRemark("Find prepared transaction message failed"); } return response; }
Example 4
Source File: EndTransactionProcessorTest.java From rocketmq-read with Apache License 2.0 | 5 votes |
private OperationResult createResponse(int status){ OperationResult response = new OperationResult(); response.setPrepareMessage(createDefaultMessageExt()); response.setResponseCode(status); response.setResponseRemark(null); return response; }
Example 5
Source File: TransactionalMessageServiceImpl.java From rocketmq with Apache License 2.0 | 5 votes |
private OperationResult getHalfMessageByOffset(long commitLogOffset) { OperationResult response = new OperationResult(); MessageExt messageExt = this.transactionalMessageBridge.lookMessageByOffset(commitLogOffset); if (messageExt != null) { response.setPrepareMessage(messageExt); response.setResponseCode(ResponseCode.SUCCESS); } else { response.setResponseCode(ResponseCode.SYSTEM_ERROR); response.setResponseRemark("Find prepared transaction message failed"); } return response; }
Example 6
Source File: EndTransactionProcessorTest.java From rocketmq with Apache License 2.0 | 5 votes |
private OperationResult createResponse(int status){ OperationResult response = new OperationResult(); response.setPrepareMessage(createDefaultMessageExt()); response.setResponseCode(status); response.setResponseRemark(null); return response; }