1
0
mirror of synced 2024-12-23 09:43:07 +01:00
Tapeti/Examples/01-PublishSubscribe/ExampleMessageController.cs

28 lines
652 B
C#
Raw Normal View History

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();
}
}
}