1

我必须使用 azurite 作为代理,不幸的是我还不能使用 azure 服务总线。所以我被迫使用

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

但是使用 JmsListener 的 azurite 容器。

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

在工厂内部,深度嵌套在 stackTrace 中的是 ConnectionStringBuilder,它附加了“amqps://”;并删除端口号。问题是我不知道如何在 azurite 中更改来自 http 的 amqps 的消息传递协议,如果不可能的话。如何覆盖类以使用 http 而不是 amqps?

4

1 回答 1

2

Azurite 适用于 Azure 队列存储,而不是 Azure 服务总线。Azure 队列存储仅支持 HTTP/S,而且该工具从未设计用于与基于 AMQP/S 的服务一起使用。

于 2020-08-30T15:56:59.033 回答