2021-07-05 10:28:49 +02: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 09:19:56 +01:00
|
|
|
|
#pragma warning disable IDE0060 // Remove unused parameter
|
2021-07-05 10:28:49 +02:00
|
|
|
|
public async Task HandleSpeedTestMessage(SpeedTestMessage message)
|
|
|
|
|
{
|
|
|
|
|
await messageParallelization.WaitForBatch();
|
|
|
|
|
}
|
2022-02-09 09:19:56 +01:00
|
|
|
|
#pragma warning restore IDE0060
|
2021-07-05 10:28:49 +02:00
|
|
|
|
}
|
|
|
|
|
}
|