Skip to content

skyDuanXianBing/SimpleUseAspireRabbitMQ

Repository files navigation

Simple RabbitMQ Use In Aspire.NET

This is a simple FrameWork of how to use RabbitMQ in Aspire .NET .Asp.net core .

  1. Install RabbitMQClint on your Aspire.Host project and Add rabbitmq container please verify your rabbitmq container is WithReference in your project like this: RabbitMQContainer

  2. Install this framework on your project.

  3. Add the ExtensionFunctions in your program.cs file. ExtensionBuilderFunction ExtensionAppFunction

  4. Use IEventBus to publish messages.

  5. Use IEventHandler/IEventJsonHandler/IEventStringHandler to subscribe to messages. in this framework,you should paste the EventAttribute in your event class. like this: EventAttribute

Note: your eventHandler's class only should have one parameter: IServiceProvider,you can use it to get any service in your eventHandler.

like this: UseIServiceProvider

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages