Hi, I am using in-memory MQ, but it’s not async; MessageFactory.Publish doesn’t return until the long-running code has executed. Is this by design (hence the “Transitory”)?
using (var producer = MessageFactory.CreateMessageProducer())
{
var mqRequest = new DeleteUploadRequest();
mqRequest.UploadId = request.UploadId;
mqRequest.Session = UserSession;
producer.Publish(mqRequest);
}
return new HttpResult(string.Empty, HttpStatusCode.OK);
Is purely to avoid the HTTP call lasting as long as the long-running code. I have a db delete that takes 10 minutes.
Not worried about persistence etc due to number of users, just want the code to execute after the http has returned.