1
0
mirror of synced 2024-11-16 14:53:50 +00:00
Tapeti/Examples/01-PublishSubscribe/ExampleMessageController.cs

28 lines
652 B
C#

using System;
using ExampleLib;
using Messaging.TapetiExample;
using Tapeti.Config.Annotations;
namespace _01_PublishSubscribe
{
[MessageController]
[DynamicQueue("tapeti.example.01")]
public class ExampleMessageController
{
private readonly IExampleState exampleState;
public ExampleMessageController(IExampleState exampleState)
{
this.exampleState = exampleState;
}
public void HandlePublishSubscribeMessage(PublishSubscribeMessage message)
{
Console.WriteLine("Received message: " + message.Greeting);
exampleState.Done();
}
}
}