1
0
mirror of synced 2024-11-22 01:13:49 +00:00
Tapeti/07-ParallelizationTest/ParallelizationMessageController.cs
Mark van Renswoude 52965b2372 Fixed #30 Test if new Tapeti async consumer runs parallel
Alternative fix for #29 Deserialization errors due to not buffering RabbitMQ Client's body
2021-07-05 10:28:49 +02:00

25 lines
665 B
C#

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;
}
public async Task HandleSpeedTestMessage(SpeedTestMessage message)
{
await messageParallelization.WaitForBatch();
}
}
}