Skip to content

Commit

Permalink
Update version and README.
Browse files Browse the repository at this point in the history
  • Loading branch information
ifgris committed Sep 10, 2024
1 parent 8f5c20f commit dbfc9b6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
## About

NanoRabbit, A **Lightweight** RabbitMQ .NET 3rd party library for .NET 6 and up, which makes a simple way to manage
*Multiple* connections, producers, consumers, and easy to use.

> *NanoRabbit is under development! Please note that some APIs may change their names or usage!*
**Multiple** *connections*, *producers*, *consumers*, and easy to use.

## Building

Expand All @@ -34,16 +32,16 @@ See [Wiki](https://github.com/cgcel/NanoRabbit/wiki/Installation) for more detai
| NanoRabbit | RabbitMQ.Client | .NET |
| :-----------: | :-------------: | :-----------: |
| 0.0.1 ~ 0.1.8 | obsolete | obsolete |
| 0.1.9, 0.2.0, 0.2.1 | 6.5.0-6.8.1 | 6.0, 7.0, 8.0 |
| 0.1.9 ~ 0.2.2 | 6.5.0-6.8.1 | 6.0, 7.0, 8.0 |

## Document

The NanoRabbit Document is at [NanoRabbit Wiki](https://github.com/cgcel/NanoRabbit/wiki).
For details, see: [NanoRabbit Wiki](https://github.com/cgcel/NanoRabbit/wiki).

## QuickStart

> *NanoRabbit is designed as a library depends on **NAMING** Producers, Consumers. So it's important to set
a **UNIQUE NAME** for each Producers, Consumers.*
> *NanoRabbit is designed as a library depends on **NAMING** Connections, Producers and Consumers. So it's important to set
a **UNIQUE NAME** for each Connections, Producers and Consumers.*

For more, please visit the [Examples](https://github.com/cgcel/NanoRabbit/tree/master/Example).

Expand Down Expand Up @@ -74,7 +72,8 @@ var rabbitHelper = new RabbitHelper(rabbitConfig: new RabbitConfiguration
Producers = new List<ProducerOptions> { new ProducerOptions {
ProducerName = "FooProducer",
ExchangeName = "amq.topic",
RoutingKey = "foo.key"
RoutingKey = "foo.key",
Type = ExchangeType.Topic
}
}
}, logger);
Expand Down Expand Up @@ -103,15 +102,21 @@ var rabbitHelper = new RabbitHelper(rabbitConfig: new RabbitConfiguration
}, logger);
```

### Simple Publish
### Simple Publish Messages

[After](#rabbitproducer) registering a `RabbitProducer` in the `RabbitHelper`, you can simply publish a message by calling `Publish<T>(string producerName, T message)`.

```csharp
rabbitHelper.Publish<string>("FooProducer", "Hello from NanoRabbit");
```

### Simple Consume
Asynchronously publishing is also available:

```csharp
await rabbitHelper.PublishAsync<string>("FooProducer", "Hello from NanoRabbit");
```

### Simple Consume Messages

[After](#rabbitconsumer) registering a `RabbitConsumer` in the `RabbitConsumer`, you can simply consume a message by
calling `AddConsumer(string consumerName, Action<string> onMessageReceived, int consumers = 1)`.
Expand All @@ -132,6 +137,8 @@ while (true)
### DependencyInjection

NanoRabbit provides some functions to inject IRabbitHelper in a simple way.

#### AddRabbitProducer

```csharp
Expand Down Expand Up @@ -209,6 +216,7 @@ More *Dependency Injection* Usage at [Wiki](https://github.com/cgcel/NanoRabbit/
- [x] ASP.NET support
- [x] TLS support
- [x] Re-trying of failed sends
- [x] Basic [RabbitMQ.Client](https://github.com/rabbitmq/rabbitmq-dotnet-client) functions extensions

## Thanks

Expand All @@ -217,6 +225,7 @@ More *Dependency Injection* Usage at [Wiki](https://github.com/cgcel/NanoRabbit/
- [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json)
- [Masstransit](https://github.com/masstransit/masstransit)
- [EasyNetQ](https://github.com/autofac/Autofac)
- [Polly.Core](https://github.com/App-vNext/Polly)

## License

Expand Down
2 changes: 1 addition & 1 deletion Src/NanoRabbit/NanoRabbit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<IncludeSymbols>True</IncludeSymbols>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PackageIcon>icon.png</PackageIcon>
<Version>0.2.1</Version>
<Version>0.2.2</Version>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

Expand Down

0 comments on commit dbfc9b6

Please sign in to comment.