Azure / azure-service-bus-emulator-installer

This repository acts as a central hub for handling issues, collecting feedback, and facilitating discussions related to the Azure Service Bus Emulator.
https://learn.microsoft.com/en-us/azure/service-bus-messaging/overview-emulator
MIT License
100 stars 2 forks source link

Protocol version mismatch when trying to create a message batch #27

Open beany opened 1 day ago

beany commented 1 day ago

First: really awesome the emulator was released!! Thank you so much :)

When trying to create a message batch with the method ServiceBusSender.CreateMessageBatchAsync() I get the following error:

System.NotSupportedException: The requested protocol version 'AMQP 3 1.0.0' is not supported. The supported version is 'AMQP 0 0.9.1'. For troubleshooting information, see https://aka.ms/azsdk/net/servicebus/exceptions/troubleshoot. at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.RunOperation[T1,TResult](Func`4 operation, T1 t1, TransportConnectionScope scope, CancellationToken cancellationToken, Boolean logTimeoutRetriesAsVerbose) at Azure.Messaging.ServiceBus.Amqp.AmqpSender.CreateMessageBatchAsync(CreateMessageBatchOptions options, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.ServiceBusSender.CreateMessageBatchAsync(CreateMessageBatchOptions options, CancellationToken cancellationToken)

Are batches not supported in the emulator?

My application is a dotnet 9 app, all packages are up to date.

krishankumar95 commented 18 hours ago

@beany : Please refer to a similar issue at EH Emulator Installer ; there is likely a RabbitMQ instance (local service/container) running on the port 5672.

If you intended to run both together, either of one could be assigned a different port.

You can tweak the host port of Service Bus Emulator by modifying the default port in docker-compose file and accordingly adjusting same in connection string.