Mark van Renswoude
8e0edabeed
Implemented two examples. More needed to get rid of the mess that is the current "Test" project.
28 lines
645 B
C#
28 lines
645 B
C#
using System;
|
|
using ExampleLib;
|
|
using Messaging.TapetiExample;
|
|
using Tapeti.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();
|
|
}
|
|
}
|
|
}
|