java - Spring Boot 应用程序启动中的嵌入式 ActiveMQ 无法正常工作
问题描述
最近,我们正在尝试在我们的 Spring Boot 应用程序中使用 ActiveMQ。我们所做的只是添加了 ActiveMQ 依赖项,如下所示:
compile("org.springframework.boot:spring-boot-starter-activemq:2.0.4.RELEASE")
以及以下配置:
#Embedded ActiveMQ Configuration
activemq:
broker-url: vm://localhost?broker.persistent=false
#Spring JMS Settings
jms:
listener:
auto-startup: true
concurrency: 1
retries: 4
exponential-backoff: true
backoff-multiplier: 5
问题是当我们尝试启动应用程序时,我们会遇到以下警告,这显然意味着 ActiveMQ 没有正确启动。
2018-10-01 11:53:36.778 WARN 112 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Setup of JMS message listener invoker failed for destination 'salesforce-queue' - trying to recover. Cause: peer (vm://localhost#5) stopped.
2018-10-01 11:53:36.778 WARN 112 --- [enerContainer-1] o.s.j.l.DefaultMessageListenerContainer : Setup of JMS message listener invoker failed for destination 'ActiveMQ.DLQ' - trying to recover. Cause: peer (vm://localhost#7) stopped.
如果您分享您的想法,我将不胜感激。
解决方案
推荐阅读
- algorithm - 使用重复减法的整数除法算法 - Off by One Errors
- django - 角度保存()方法不起作用英雄教程
- sql - SQL Server 触发器中的条件检查
- amazon-web-services - 从 serverless.yml 创建 AWS Cognito 用户池
- c - 返回函数指针数组
- minikube - 我在哪里可以找到部署在 minikube 中的应用程序的主机 IP 地址
- c# - 触发时对象不使用 Sprite Renderer 出现
- java - 在Java中使用带有反应式包装器的非阻塞IO逐行读取文件
- java - 改造缓存的问题
- javascript - 如何在运行脚本之前检查 URL 中的特定单词?