title: Send async Task<IActionResult> from receiver to Sender in MASSTRANNSIT
body: <p>I am stuck at one point in Azure ServiceBus Queue implementation using MASSTRANSIT. Below is my scenario and code.</p>
  
  <p>My Sender is in EventController.cs and its code is as follow's.</p>
  
  <pre><code>    [ProducesResponseType(202)]
      [ProducesResponseType(400)]
      [ProducesResponseType(401)]
      [ProducesResponseType(404)]
      [HttpPut("{applicationNumber}/{systemId}/DipDecisionUpdated/{decisionId}")]
      public async Task&lt;IActionResult&gt; DipDecisionUpdated([Required]string applicationNumber, [Required]SystemEnum systemId, [Required]string decisionId, [Required][FromQuery]string externalApplicationReference)
      {
          bool done = false;
          if (!_applicationHelper.CheckApplicationAndOtherSystemReferences(applicationNumber, externalApplicationReference))
          {
              return NotFound();
          }
  
          if (!ModelState.IsValid)
          {
              return BadRequest();
          }
  
          #region MassTransit Sender for DipDecisionUpdated
          if (_dipDecisionSendersEnabled)
          {
              //If MassTransit Senders are enabled, send a "ApplicationUpgradeDecision" message to the Message Bus                
              Task&lt;bool&gt; downloading = SendDipDecisionMessagetoMessageBus(applicationNumber, systemId.ToString(), decisionId, externalApplicationReference);
              done = await downloading.ConfigureAwait(false);
          }
          #endregion MassTransit Sender DipDecisionUpdated
          return null;            
      }
  </code></pre>
  
  <p>Now instead of return Null I want to get Consumer Reply here.</p>
  
  <p>My consumer is as follow's.</p>
  
  <pre><code> /// &lt;summary&gt;
      /// Consume and action the incoming "DipDecision" message
      /// &lt;/summary&gt;
      /// &lt;param name="context"&gt;&lt;/param&gt;
      /// &lt;returns&gt;&lt;/returns&gt;
      public async Task Consume(ConsumeContext&lt;DipDecision&gt; context)
      {
          try
          {
              var decision = await _getDecisionRepository.GetDecision(context.Message.ApplicationNumber).ConfigureAwait(false);
  
              int decisionInNum = 0;
              bool result = Int32.TryParse(context.Message.DecisionId, out decisionInNum);
  
              if (!string.IsNullOrWhiteSpace(decision) &amp;&amp; decision == context.Message.DecisionId &amp;&amp; result)
              {
                  MortgageApplyApplicationStatus applicationStatus;
                  switch (decisionInNum)
                  {
                      case (int)UnderWritersDecision.Accepted:
                          applicationStatus = MortgageApplyApplicationStatus.Accepted;
                          break;
  
                      case (int)UnderWritersDecision.Referred:
                          applicationStatus = MortgageApplyApplicationStatus.UnderwriterAssigned;
                          break;
  
                      case (int)UnderWritersDecision.Declined:
                          applicationStatus = MortgageApplyApplicationStatus.Declined;
                          break;
  
                      case (int)UnderWritersDecision.NoDecision:
                          applicationStatus = MortgageApplyApplicationStatus.Declined;
                          break;
  
                      default:
                          applicationStatus = MortgageApplyApplicationStatus.Withdrawn;
                          break;
  
                  }
  
                  if (context.Message.SystemId == SystemEnum.Twenty7Tec.ToString())
                      await Update27TecApplicationStatus(context.Message.ExternalApplicationReference, applicationStatus).ConfigureAwait(false);
              }
              //return null;
          }
  
          catch (WebException we)
          {
              var exceptionCode = we.Response as HttpWebResponse;
              if (exceptionCode != null)
              {
                  switch (exceptionCode.StatusCode)
                  {
                      case HttpStatusCode.Accepted:
                          return Accepted();
                      case HttpStatusCode.Forbidden:
                          return Forbid(); //StatusCode(403);
                      case HttpStatusCode.BadRequest:
                          return BadRequest();
                      default:
                          return NotFound();
                  }
              }
          }
          //Consumer Start from here
          await _service.ServiceTheThing(context.Message.ApplicationNumber).ConfigureAwait(true);
  
          await context.RespondAsync(new
          {
              applicationNumber = $"DipDecision - Consumer Received DIP Decision for application number : {context.Message.ApplicationNumber}",
              systemId = $"DipDecision - Consumer Received DIP Decision against system : {context.Message.SystemId}",
              decisionId = $"DipDecision - Consumer Received DIP Decision against system : {context.Message.DecisionId}",
              externalApplicationReference = $"DipDecision - Consumer Received DIP Decision from external application reference number : {context.Message.ExternalApplicationReference}"
          }).ConfigureAwait(true);
  
      }
      //Consumer Over
  </code></pre>
  
  <p>However return Accepted(), BadRequest() are showing me error as doesn't exist in context. </p>
  
  <p>Also if all looks good I want to execute consumer code and it should return OK() to sender. </p>
  
  <p>My consumer code is in same project but in DipDecisionConsumer.cs File.</p>
  
  <p>Please help and let me know your suggestions.</p>