admin管理员组文章数量:1122832
I'm trying to work with service bus emulator , with my java 21 spring boot project .
as a reference I followed this link: MS Azure service bus article
at first I'm trying to start the service bus in a docker and create a simple main to send and receive i manage to get the docker up and running : 1 issue i have is that the custom config i edit is not read but the docker when it start and i get the default config. (the config is in the same folder as the docker.yml)
this is my docker yml :
name: microsoft-azure-servicebus-emulator
services:
emulator:
container_name: "servicebus-emulator"
image: mcr.microsoft/azure-messaging/servicebus-emulator:latest
volumes:
- "Config.json"
ports:
- "5672:5672" # AMQP port
- "9354:9354" # Management port
environment:
SQL_SERVER: sqledge
MSSQL_SA_PASSWORD: Adm1n!@2123
ACCEPT_EULA: Y
depends_on:
- sqledge
networks:
sb-emulator:
aliases:
- "sb-emulator"
sqledge:
container_name: "sqledge"
image: "mcr.microsoft/azure-sql-edge:latest"
networks:
sb-emulator:
aliases:
- "sqledge"
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Adm1n!@2123
networks:
sb-emulator:
and this is my simple code :
public static void main(String[] args) {
String CONNECTION_STRING ="Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;";
ServiceBusAdministrationClient serviceBusAdministrationClient = new ServiceBusAdministrationClientBuilder()
.connectionString(CONNECTION_STRING).buildClient();
boolean subscriptionExists = serviceBusAdministrationClient.getSubscriptionExists("topic.1", "subscription.1");
System.out.println("Subscription exists: " + subscriptionExists);
and when i try to run it i keep getting the following error :
Exception in thread "main" java.io.UncheckedIOException: ioty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/[0:0:0:0:0:0:0:1]:443
can u help me understand what is the issue ? Thank you all, Oded
本文标签: azureservicebusazure Service Bus EmulatorStack Overflow
版权声明:本文标题:azureservicebus - azure Service Bus Emulator - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736301343a1931145.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论