2021-10-07 12:03:39 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Messaging.TapetiExample;
|
2023-04-14 13:47:27 +00:00
|
|
|
|
using Tapeti.Config.Annotations;
|
2021-10-07 12:03:39 +00:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|