Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/easynetq/easynetq
An easy to use .NET API for RabbitMQ
https://github.com/easynetq/easynetq
dotnet dotnet-core messaging rabbitmq
Last synced: 4 days ago
JSON representation
An easy to use .NET API for RabbitMQ
- Host: GitHub
- URL: https://github.com/easynetq/easynetq
- Owner: EasyNetQ
- License: mit
- Created: 2011-04-21T15:47:20.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-12-03T12:30:20.000Z (19 days ago)
- Last Synced: 2024-12-11T13:02:13.870Z (11 days ago)
- Topics: dotnet, dotnet-core, messaging, rabbitmq
- Language: C#
- Homepage: http://easynetq.com
- Size: 68.7 MB
- Stars: 2,910
- Watchers: 156
- Forks: 749
- Open Issues: 80
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[![Build status](https://github.com/EasyNetQ/EasyNetQ/workflows/CI/badge.svg)](https://github.com/EasyNetQ/EasyNetQ/actions?query=workflow%3ACI)
[![NuGet Status](https://img.shields.io/nuget/v/EasyNetQ)](https://www.nuget.org/packages/EasyNetQ)
[![Nuget Status](https://img.shields.io/nuget/vpre/EasyNetQ)](https://www.nuget.org/packages/EasyNetQ/absoluteLatest)
[![Nuget Status](https://img.shields.io/nuget/dt/EasyNetQ)](https://www.nuget.org/packages/EasyNetQ)![Activity](https://img.shields.io/github/commit-activity/w/EasyNetQ/easynetq)
![Activity](https://img.shields.io/github/commit-activity/m/EasyNetQ/easynetq)
![Activity](https://img.shields.io/github/commit-activity/y/EasyNetQ/easynetq)
--![EasyNetQ Logo](https://github.com/EasyNetQ/EasyNetQ/wiki/images/logo_design_150.png)
A Nice .NET API for RabbitMQ
Initial development was sponsored by travel industry experts [15below](http://15below.com/)
* **[Homepage](http://easynetq.com)**
* **[Documentation](https://github.com/EasyNetQ/EasyNetQ/wiki/Introduction)**
* **[NuGet](http://www.nuget.org/packages/EasyNetQ)**
* **[Discussions](https://github.com/EasyNetQ/EasyNetQ/discussions)**
* **[~Old Discussion Group~](https://groups.google.com/group/easynetq)**Goals:
### Important Update
With the release of EasyNetQ v8, the method for connecting to a RabbitMQ broker has changed. The rest of the API remains unchanged.
To make working with RabbitMQ on .NET as easy as possible.
To connect to a RabbitMQ broker in v7...
```c#
var bus = RabbitHutch.CreateBus("host=localhost");
```To connect to a RabbitMQ broker in v8...
```c#
var serviceCollection = new ServiceCollection();
serviceCollection.AddEasyNetQ("host=localhost").UseSystemTextJson();using var provider = serviceCollection.BuildServiceProvider();
var bus = provider.GetRequiredService();
```To publish a message...
```c#
await bus.PubSub.PublishAsync(message);
```To publish a message with a 5s delay...
```c#
await bus.Scheduler.FuturePublishAsync(message, TimeSpan.FromSeconds(5));
```To subscribe to a message...
```c#
await bus.PubSub.SubscribeAsync(
"my_subscription_id", msg => Console.WriteLine(msg.Text)
);```
Remote procedure call...
```c#
var request = new TestRequestMessage {Text = "Hello from the client! "};
await bus.Rpc.RequestAsync(request);
```RPC server...
```c#
await bus.Rpc.RespondAsync(request =>
new TestResponseMessage{ Text = request.Text + " all done!" }
);
```## Getting started
Just open EasyNetQ.sln in your preferred IDE or code editor and build. All the required dependencies for the solution file to build the software are included.
## Contributors
Thanks to all the people who already contributed!