1
0
mirror of synced 2024-12-22 17:23:07 +01:00
Tapeti/README.md

70 lines
3.2 KiB
Markdown
Raw Normal View History

2019-10-21 14:03:48 +02:00
## Introduction
Tapeti is a wrapper for the RabbitMQ .NET Client designed for long-running microservices. Its 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
/// <summary>
/// Example of a simple broadcast message used in the standard publish - subscribe pattern
/// </summary>
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.
2017-02-11 14:54:35 +01:00
## Documentation
The documentation for Tapeti is available on Read the Docs:
2016-09-04 14:49:10 +02:00
[Master branch (stable release)](http://tapeti.readthedocs.io/en/stable/introduction.html)<br />
[![Documentation Status](https://readthedocs.org/projects/tapeti/badge/?version=stable)](http://tapeti.readthedocs.io/en/stable/introduction.html?badge=stable)
[Develop branch](http://tapeti.readthedocs.io/en/latest/introduction.html)<br />
[![Documentation Status](https://readthedocs.org/projects/tapeti/badge/?version=latest)](http://tapeti.readthedocs.io/en/latest/introduction.html?badge=latest)
2017-10-17 17:24:53 +02:00
## Related repositories
Parts of Tapeti have been split into their own repository. This allows them to have their own version numbers which increases compatibility between shared message packages when services use different Tapeti versions.
- [Tapeti.Annotations](https://github.com/MvRens/Tapeti.Annotations)
annotations used in message classes, like [Request]
- [Tapeti.DataAnnotations.Extensions](https://github.com/MvRens/Tapet.DataAnnotations.Extensions)
generic data annotation attributes useful in messages, like the [RequiredGuid] attribute
- [Tapeti.Cmd](https://github.com/MvRens/Tapeti.Cmd)
the standalone tool to manage RabbitMQ messages and queues, focused on Tapeti-compatible messages
2017-10-17 17:24:53 +02:00
## Builds
Builds are automatically run using AppVeyor, with the resulting packages being pushed to NuGet.
2019-10-21 14:03:48 +02:00
Master build (stable release)
2017-10-17 17:44:22 +02:00
[![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
2019-10-21 14:03:48 +02:00
[![Build status](https://ci.appveyor.com/api/projects/status/cyuo0vm7admy0d9x?svg=true)](https://ci.appveyor.com/project/MvRens/tapeti)