RabbitMQ.Client.Core.DependencyInjection icon indicating copy to clipboard operation
RabbitMQ.Client.Core.DependencyInjection copied to clipboard

Upcoming changes

Open antonyvorontsov opened this issue 4 years ago • 4 comments

I have struggled to find free time to develop this project due to my busy schedule and it looked like this library is frozen, but now I am going to get back to the active stage of development. This issue is representation of my plans on version 5.0.0 and upcoming ones which imply breaking changes to the current paradigm of how the library works. So I want to share my plans to anyone who is interested.

version 5.0.0

  • Remove IQueueService interface and split the service into two parts ✔️
  • Add IConsumingService and its implementation ✔️
  • Add HostedService that will run StartConsuming method ✔️
  • Add HostedService that will be responsible for declaring queues and exchanges ✔️
  • Remove queues and exchanges declaration from the constructor of consuming and producing services ✔️
  • Remove IAsyncNonCyclicMessageHandler and INonCyclicMessageHandler due to their redundancy ✔️
  • Remove IAsyncNonCyclicMessageHandler and INonCyclicMessageHandler dependency injection extensions ✔️
  • Add extension methods that will allow to register components flexibly (e.g. start consuming in your own component) ❌ (next update)
  • Add new option that will allow to disable logging for those who do now want to get default log messages ✔️
  • Update documentation (obviously)
  • Annotate everything with nullable reference types ✔️
  • Update examples

If you want to request some functionality feel free to do it.

This issue will be updated with additional information.

antonyvorontsov avatar Feb 11 '21 22:02 antonyvorontsov

what is the replacement from IQueueService in term of sending message?

MaslovD avatar Jun 03 '21 02:06 MaslovD

This one https://github.com/AntonyVorontsov/RabbitMQ.Client.Core.DependencyInjection/blob/master/src/RabbitMQ.Client.Core.DependencyInjection/Services/Interfaces/IProducingService.cs

antonyvorontsov avatar Jun 03 '21 17:06 antonyvorontsov

Are there plans to implement publish confirms? https://www.rabbitmq.com/confirms.html#publisher-confirms

ayelchin avatar Sep 24 '21 14:09 ayelchin

If we want two different microservices to handle the same event, we need to have two different queues

Currently, I define queues in the following way:

new RabbitMqExchangeOptions()
                            {
                                Type = "direct",
                                DeadLetterExchange = "exchange.dlx",
                                RequeueAttempts = 4,
                                RequeueTimeoutMilliseconds = 50,
                                Queues = new List<RabbitMqQueueOptions>
                                {
                                    new()
                                    {
                                        Name = $"{QueuePrefix}-{UserStatusChangedRoutingKey}",
                                        RoutingKeys = new HashSet<string> { UserStatusChangedRoutingKey }
                                    },
                                    
                                }
                            })

But it would be handy if we only provide queue name and this library automatically creates queue with name which consist of QueuePrefix from configuration(will need to add to config) + queue name supplied by a user

@AntonyVorontsov What do you think?

remotenode avatar Oct 25 '21 15:10 remotenode