org.springframework.amqp.AmqpTimeoutException: java.util.concurrent.TimeoutException at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:74) at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:476) at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:614) at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:240) at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:1810) at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1784) at org.springframework.amqp.rabbit.core.RabbitTemplate.send(RabbitTemplate.java:864) at org.springframework.amqp.rabbit.core.RabbitTemplate.convertAndSend(RabbitTemplate.java:927) at org.springframework.amqp.rabbit.core.RabbitTemplate.convertAndSend(RabbitTemplate.java:921) at com.demo.business.controller.RabbitMQController.send(RabbitMQController.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:870) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:776) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:870) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at com.demo.config.filter.CrossFilter.doFilterInternal(CrossFilter.java:31) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.TimeoutException: null at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:77) at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:120) at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36) at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:494) at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:306) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:957) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:907) at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:847) at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:449)
SpringBoot连接RabbitMQ,推送消息报连接超时的错误。
端口写错了。RabbitMQ有3个端口,java连接需要使用:5672。
查看端口:
进入后台管理页面(ip:15672),点击Overview下的Ports and contexts
相关推荐
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.amqp.core.Queue]: Factory method 'clientQueue' threw exception; nested exception is org....
Spring AMQP 是一个由 Spring Framework 提供的框架,它允许开发者使用 Spring 的编程模型与 RabbitMQ 消息中间件进行交互。RabbitMQ 是一种流行的开源消息代理,它实现了 Advanced Message Queuing Protocol (AMQP)...
The Spring Framework is an open source application framework that can be used with any Java application. After reading this book, you will know how to do the following: • Use the Spring Framework ...
【标题】"spring-amqp-1.2.2.RELEASE.zip" 涉及的知识点主要围绕Spring AMQP框架的1.2.2版本。Spring AMQP是Spring框架的一个扩展,它提供了对Advanced Message Queuing Protocol (AMQP)的支持,AMQP是一种标准的...
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.factory.annotation.Autowired; import org....
import org.springframework.amqp.rabbit.annotation.RabbitListener; public class MessageReceiver { @RabbitListener(queues = "hello") public void receiveMessage(String in, Message message) { System....
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; @Component public class RabbitConsumer { @RabbitListener(queues = "myQueue") ...
- **AOP代理**:`org.springframework.aop.ProxyFactoryBean`或`org.springframework.aop.framework.ProxyFactory`,创建AOP代理对象,实现切面逻辑。 - **事件驱动**:`ApplicationEvent`和`ApplicationListener`...
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; @Component public class MessageConsumer { @RabbitListener(queues = "queue_name") ...
在Java开发中,Spring AMQP框架为开发者提供了与RabbitMQ(一个流行的AMQP实现)集成的便利,使得我们可以轻松地在应用中构建消息驱动的架构。 首先,我们来了解下`spring-amqp`。Spring AMQP是Spring框架的一个...
amqp.pdf来源:https://www.amqp.org/sites/amqp.org/files/amqp.pdf amqp-core-complete-v1.0.pdf来源:http://docs.oasis-open.org/amqp/core/v1.0/amqp-core-complete-v1.0.pdf amqp.0-10.pdf、amqp.0-10.xml 、...
Spring框架中的spring-messaging模块提供了一种基于WebSocket的STOMP协议实现,STOMP消息代理在处理客户端消息时存在SpEL表达式注入漏洞,因此攻击者可以通过构造恶意的消息来实现远程代码执行。 Windows平台...
ActiveMQ是Apache组织开发的一款开源的消息中间件,它支持多种消息协议,如AMQP、STOMP、MQTT等,但最常使用的还是JMS(Java Message Service)。在本示例中,我们将探讨如何使用Maven构建项目,结合Spring框架来...
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; @Component public class RabbitMQConsumer { @RabbitListener(queues = "queue_name") ...
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate"> ``` 然后,你可以创建一个生产者类,使用Spring的`JmsTemplate`发送消息到ActiveMQ队列: ```java import org.springframework....
import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainerFactoryConfigurer; @Configuration public class RabbitConfig { @Value("${spring.rabbitmq.first.host}") private String ...
Spring Framework是Java开发领域中的一个核心框架,以其模块化、松耦合和强大的依赖注入特性而闻名。本次我们关注的是Spring Framework的4.3.30.RELEASE版本,这是一个稳定且广泛使用的版本,为开发者提供了丰富的...
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; @Component public class RabbitMQConsumer { @RabbitListener(queues = "myQueue") ...
<bean id="rabbitConnectionFactory" class="org.springframework.amqp.rabbit.connection.CachingConnectionFactory"> <!-- 创建RabbitTemplate实例 --> <bean id="rabbitTemplate" class="org....