1
0
mirror of synced 2024-11-24 01:33:50 +00:00
Tapeti/Examples/08-MessageHandlerLogging/SpeedyMessageController.cs

20 lines
618 B
C#
Raw Normal View History

using System;
using Messaging.TapetiExample;
using Tapeti.Config.Annotations;
using Tapeti.Serilog;
namespace _08_MessageHandlerLogging
{
[MessageController]
[DynamicQueue("tapeti.example.08.speedy")]
public class SpeedyMessageController
{
// ReSharper disable once InconsistentNaming
public void IAmSpeed(PublishSubscribeMessage message, IDiagnosticContext diagnosticContext)
{
diagnosticContext.Set("PropertySetByMessageHandler", 42);
Console.WriteLine("Received message (in speedy controller): " + message.Greeting);
}
}
}