This is a simple FrameWork of how to use RabbitMQ in Aspire .NET .Asp.net core .
-
Install RabbitMQClint on your Aspire.Host project and Add rabbitmq container please verify your rabbitmq container is WithReference in your project like this:
-
Install this framework on your project.
-
Use IEventBus to publish messages.
-
Use IEventHandler/IEventJsonHandler/IEventStringHandler to subscribe to messages. in this framework,you should paste the EventAttribute in your event class. like this: