From c453b96a86348b01b9f8458d512c570b1a119454 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Mon, 21 Oct 2019 14:03:48 +0200 Subject: [PATCH] Readme updated for 2.0 merge --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3140207..827d424 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,45 @@ +## Introduction +Tapeti is a wrapper for the RabbitMQ .NET Client designed for long-running microservices. It’s main goal is to minimize the amount of messaging code required, and instead focus on the higher-level flow. + +## Key features +* Consumers are declared using MVC-style controllers and are registered automatically based on annotations +* Publishing requires only the message class, no transport details such as exchange and routing key +* Flow extension (stateful request - response handling with support for parallel requests) +* No inheritance required +* Graceful recovery in case of connection issues, and in contrast to most libraries not designed for services, during startup as well +* Extensible using middleware + +## Show me the code! +Below is a bare minimum message controller from the first example project to get a feel for how messages are handled using Tapeti. +```csharp +/// +/// Example of a simple broadcast message used in the standard publish - subscribe pattern +/// +public class PublishSubscribeMessage +{ + [Required(ErrorMessage = "Don't be impolite, supply a {0}")] + public string Greeting { get; set; } +} + + +[MessageController] +[DynamicQueue("tapeti.example.01")] +public class ExampleMessageController +{ + public ExampleMessageController() { } + + public void HandlePublishSubscribeMessage(PublishSubscribeMessage message) + { + Console.WriteLine("Received message: " + message.Greeting); + } +} +``` + +More details and examples can be found in the documentation as well as the example projects included with the source. + ## Documentation The documentation for Tapeti is available on Read the Docs: -[2.0 beta release branch](http://tapeti.readthedocs.io/en/release-2.0/introduction.html)
-[![Documentation Status](https://readthedocs.org/projects/tapeti/badge/?version=release-2.0)](http://tapeti.readthedocs.io/en/release-2.0/introduction.html?badge=release-2.0) - [Master branch (stable release)](http://tapeti.readthedocs.io/en/stable/introduction.html)
[![Documentation Status](https://readthedocs.org/projects/tapeti/badge/?version=stable)](http://tapeti.readthedocs.io/en/stable/introduction.html?badge=stable) @@ -15,11 +51,8 @@ The documentation for Tapeti is available on Read the Docs: ## Builds Builds are automatically run using AppVeyor, with the resulting packages being pushed to NuGet. -2.0 beta release build -[![Build status](https://ci.appveyor.com/api/projects/status/cyuo0vm7admy0d9x/branch/release/2.0?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti/branch/release/2.0) - -Master build +Master build (stable release) [![Build status](https://ci.appveyor.com/api/projects/status/cyuo0vm7admy0d9x/branch/master?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti/branch/master) Latest build -[![Build status](https://ci.appveyor.com/api/projects/status/cyuo0vm7admy0d9x?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti) +[![Build status](https://ci.appveyor.com/api/projects/status/cyuo0vm7admy0d9x?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti) \ No newline at end of file