대기열을 수신 대기하는 메시지 수신기가 있습니다. 메시지 브로커가 중지되거나 종료되면 응용 프로그램이 갑자기 종료됩니다. 대기열을 수신하기 전에 JMS 브로커 연결을 확인하는 방법이 있습니까? 리스너 코드는 JMS 브로커가 작동중인 경우에만 사용 가능해야합니다. 우리는 당신이있는 경우에만 성공의 ActiveMQ와 때마다 당신에게 설치 연결로 당신이 당신의 연결이 활성화 될 테스트 할 수 없습니다Jms 브로커 연결 - 대기열을 청취하기 전에 연결을 테스트하십시오. - java
org.springframework.context.ApplicationContextException: Failed to start bean 'xx'; nested exception is org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Could not connect to broker URL: tcp://xx:61616. Reason: java.net.ConnectException: Connection refused: connect
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:176)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:346)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:142)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:485)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:120)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
아니요. 대기열을 들으면 연결이 테스트됩니다. 다시 듣기 전에 다시 테스트하는 것은 쓸모 없습니다. – EJP