BEagle1984 / silverback

Silverback is a simple but feature-rich message bus for .NET core (it currently supports Kafka, RabbitMQ and MQTT).
https://silverback-messaging.net
MIT License
258 stars 38 forks source link

Need additional option to don't create a queue for RabbitMq connection process #236

Open Konstantin060290 opened 3 days ago

Konstantin060290 commented 3 days ago

If you don't have an permittion to create a queue (Configure permission) you will receive a connection error:

EventName=Silverback.Integration_ConsumerConnectError RabbitMQ.Client.Exceptions.OperationInterruptedException: The AMQP operation was interrupted: AMQP close-reason, initiated by Peer, code=403, text='ACCESS_REFUSED - access to queue 'dummy' in vhost '/' refused for user 'someUser'', classId=50, methodId=10 at RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply(TimeSpan timeout) at RabbitMQ.Client.Impl.ModelBase.QueueDeclare(String queue, Boolean passive, Boolean durable, Boolean exclusive, Boolean autoDelete, IDictionary2 arguments) at RabbitMQ.Client.Impl.ModelBase.QueueDeclare(String queue, Boolean durable, Boolean exclusive, Boolean autoDelete, IDictionary2 arguments) at RabbitMQ.Client.Impl.AutorecoveringModel.QueueDeclare(String queue, Boolean durable, Boolean exclusive, Boolean autoDelete, IDictionary`2 arguments) at Silverback.Messaging.Broker.Rabbit.RabbitConnectionFactory.GetChannel(RabbitConsumerEndpoint endpoint) at Silverback.Messaging.Broker.RabbitConsumer.ConnectCoreAsync() at Silverback.Messaging.Broker.Consumer.ConnectAndStartAsync()

So it will be cool to have an option to create or not create a queue in connection process for RabbitMq.

BEagle1984 commented 3 days ago

Thank you for raising this issue. Just a heads-up that RabbitMQ support will be deprecated in Silverback v5. You can find more details and the reasoning in the discussion here: https://github.com/BEagle1984/silverback/discussions/237.

Contributions are welcome if someone wants to take over maintaining it!