Describe the bug
If I have Wolverine set up to use RabbitMq with conventional routing, with or without durable in and out boxes, and the durability mode set to Balanced then:
- This exception is thrown for each listener when starting the application:
fail: Wolverine.RabbitMQ.Internal.RabbitMqListener[0]
Callback error in Rabbit Mq agent Wolverine.RabbitMQ.Internal.RabbitMqListener
System.InvalidOperationException: Should never be called.
at RabbitMQ.Client.AsyncDefaultBasicConsumer.RabbitMQ.Client.IBasicConsumer.HandleBasicConsumeOk(String consumerTag)
- This exception is thrown when messages are published to one of the queues:
fail: Wolverine.RabbitMQ.Internal.RabbitMqListener[0]
Callback error in Rabbit Mq agent Wolverine.RabbitMQ.Internal.RabbitMqListener
System.InvalidOperationException: Should never be called.
at RabbitMQ.Client.AsyncDefaultBasicConsumer.RabbitMQ.Client.IBasicConsumer.HandleBasicDeliver(String consumerTag, UInt64 deliveryTag, Boolean redelivered, String exchange, String routingKey, IBasicProperties properties, ReadOnlyMemory`1 body)
at RabbitMQ.Client.Impl.ConcurrentConsumerDispatcher.<>c__DisplayClass10_0.<HandleBasicDeliver>b__0()
To Reproduce
- I am using
WolverineFx and WolverineFx.RabbitMQ version 1.18.1 and RabbitMQ.Client version 6.8.1
- I am using the latest docker image for
rabbitmq:management
- This is a snippet of code I have used to configure Wolverine with RabbitMq, leaving Wolverine on the default durability mode (Balanced):
var configuration = options
.UseRabbitMq(settings =>
{
settings.UserName = "user";
settings.Password = "password";
settings.VirtualHost = "virtual_host";
})
.UseConventionalRouting(configuration => configuration
.QueueNameForListener(type => type.FullName.Replace('.', '-').ToLower())
.ExchangeNameForSending(type => type.FullName.Replace('.', '-').ToLower())
.ConfigureListeners((listener, context) => listener.UseDurableInbox())
.ConfigureSending((sender, context) => sender.UseDurableOutbox()))
.EnableWolverineControlQueues()
.AutoProvision();
- This is the only configuration I am using for Wolverine:
options.AutoBuildMessageStorageOnStartup = true;
options.Policies.AutoApplyTransactions();
options.UseNewtonsoftForSerialization(config =>
{
config.NullValueHandling = NullValueHandling.Ignore;
config.TypeNameHandling = TypeNameHandling.None;
config.Converters.Add(new StringEnumConverter());
config.ContractResolver = new DefaultContractResolver
{
NamingStrategy = new CamelCaseNamingStrategy()
};
});
Screenshots
Startup exceptions:

Exceptions when messages are published:

Additional context
Using the Solo durability mode mitigates these issues, and everything runs as expected.
Thanks
Kurt
Describe the bug
If I have Wolverine set up to use RabbitMq with conventional routing, with or without durable in and out boxes, and the durability mode set to Balanced then:
To Reproduce
WolverineFxandWolverineFx.RabbitMQversion 1.18.1 andRabbitMQ.Clientversion 6.8.1rabbitmq:managementScreenshots
Startup exceptions:
Exceptions when messages are published:
Additional context
Using the Solo durability mode mitigates these issues, and everything runs as expected.
Thanks
Kurt