Mark van Renswoude
52965b2372
Alternative fix for #29 Deserialization errors due to not buffering RabbitMQ Client's body
25 lines
665 B
C#
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();
|
|
}
|
|
}
|
|
}
|