Microsoft recently released the Azure Event Hubs emulator, which could simplify local development and testing.
Unfortunately, at the moment, the Azure Event Hubs emulator cannot be directly used with Spring Azure Cloud 4.x/5.x. This is because the Azure SDK for Java does not support the new connection string parameter ‘UseDevelopmentEmulator’ and cannot connect to the unsecured AMQP port.
However, there is a workaround solution available.
Feel free to explore examples and the workaround solution at https://github.com/mirkoiv/azure-event-hubs-emulator-installer
Problem
The emulator runs on the unsecured AMQP 5672 port. To interact with the emulator, you need to use a predefined connection string that includes the new parameter ‘UseDevelopmentEmulator’.
This new parameter is utilized within the Azure SDK to establish a connection to the emulator over port 5672. Otherwise, the connection will default to the secured AMQP port 5671, requiring a certificate for authentication.
Spring Azure Cloud versions 4.x/5.x depend on an SDK that does not support the new connection string parameter. This results in an ‘Illegal connection string parameter name: UseDevelopmentEmulator’ exception.
You can attempt to use a newer version of the SDK dependency (azure-core-amqp 2.9.4), which does support the new parameter. However, be aware that it also contains a bug (Azure/azure-sdk-for-java#40938) preventing the setup of an insecure connection to the emulator.
Workaround
A workaround solution involves using a self-signed certificate and a reverse proxy with SSL termination in front of the emulator.

For details visit https://github.com/mirkoiv/azure-event-hubs-emulator-installer/blob/main/Sample-Code-Snippets/Java/spring-cloud-azure-samples/README.md