Search code examples
springazureservicebusazurite

Azurite only with http?


I have to use azurite as broker, unfortunately I can't use azure service bus yet. So I was forced to use

<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-servicebus-jms-spring-boot-starter</artifactId>
    <version>2.3.3</version>
</dependency>

But with azurite container for JmsListener.

  @JmsListener(destination = QUEUE_NAME, containerFactory = "jmsListenerContainerFactory")
    public void receiveMessage(String message) {
        logger.info("Received message: {}", message);
    }

Inside factory, deeply nested in stackTrace is ConnectionStringBuilder which appends "amqps://"; and removes port number. The problem is that I don't know how to change messaging protocol in azurite for amqps from http and If it is not possible. How to overrite classes to use http not not amqps?


Solution

  • Azurite is intended for Azure Queue Storage, not Azure Service Bus. Azure Queue Storage is HTTP/S only and the tool was never designed to work with AMQP/S based services.