Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public SendResult(SendStatus sendStatus, SendMessageResponse messageResult, string errorMessage)
 {
     SendStatus = sendStatus;
     MessageResult = messageResult;
     ErrorMessage = errorMessage;
 }