Is there a way for a service to poll the MQ broker and read multiple requests if the queue depth is long? This would greatly simplify a lot of our code where we need to batch up requests to another API but the producers are best suited to messaging.
Something like this working would be amazing:
public class testq
{
}
public object Any(testq req)
{
Console.WriteLine("Single Called");
System.Threading.Thread.Sleep(1000);
return new HttpResult() { StatusCode = System.Net.HttpStatusCode.NoContent };
}
public object Any(testq[] req)
{
Console.WriteLine("Batch Called");
return new HttpResult() { StatusCode = System.Net.HttpStatusCode.NoContent };
}
public object Any(fooReq req)
{
for(var i=0;i<9999;i++)
{
Gateway.Publish(new testq());
}
return "";
}