2021-07-05 08:28:49 +00:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Messaging.TapetiExample;
|
|
|
|
|
using Tapeti.Annotations;
|
|
|
|
|
|
|
|
|
|
namespace _07_ParallelizationTest
|
|
|
|
|
{
|
|
|
|
|
[MessageController]
|
|
|
|
|
[DynamicQueue("tapeti.example.07")]
|
|
|
|
|
public class ParallelizationMessageController
|
|
|
|
|
{
|
|
|
|
|
private readonly IMessageParallelization messageParallelization;
|
|
|
|
|
|
|
|
|
|
public ParallelizationMessageController(IMessageParallelization messageParallelization)
|
|
|
|
|
{
|
|
|
|
|
this.messageParallelization = messageParallelization;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2022-02-09 08:19:56 +00:00
|
|
|
|
#pragma warning disable IDE0060 // Remove unused parameter
|
2021-07-05 08:28:49 +00:00
|
|
|
|
public async Task HandleSpeedTestMessage(SpeedTestMessage message)
|
|
|
|
|
{
|
|
|
|
|
await messageParallelization.WaitForBatch();
|
|
|
|
|
}
|
2022-02-09 08:19:56 +00:00
|
|
|
|
#pragma warning restore IDE0060
|
2021-07-05 08:28:49 +00:00
|
|
|
|
}
|
|
|
|
|
}
|