public RemotingResponse HandleRequest(IRequestHandlerContext context, RemotingRequest request) { var sendMessageRequest = MessageUtils.DecodeSendMessageRequest(request.Body); var storeResult = _messageService.StoreMessage(sendMessageRequest.Message, sendMessageRequest.QueueId); _brokerController.SuspendedPullRequestManager.NotifyNewMessage(sendMessageRequest.Message.Topic, storeResult.QueueId, storeResult.QueueOffset); var sendMessageResponse = new SendMessageResponse( storeResult.MessageOffset, new MessageQueue(sendMessageRequest.Message.Topic, storeResult.QueueId), storeResult.QueueOffset); var responseData = _binarySerializer.Serialize(sendMessageResponse); return new RemotingResponse((int)ResponseCode.Success, request.Sequence, responseData); }
public SendResult(SendStatus sendStatus, SendMessageResponse messageResult, string errorMessage) { SendStatus = sendStatus; MessageResult = messageResult; ErrorMessage = errorMessage; }