Spring-boot集成RabbitMQ踩过的坑
1.java.net.SocketException: socket closed
官方文档已经说明,新建user和guest的账户是没有远程登录的权限的 需要对登录所用账户授权
解决方法:
rabbitmqctl set_permissions -p /${user_name} user_admin '.*' '.*' '.*'
2.
An unexpected connection driver error occured 报错如下
[AMQP Connection 192.168.71.111:5672] WARN com.rabbitmq.client.impl.ForgivingExceptionHandler - An unexpected connection driver error occured (Exception message: Connection reset)
Exception in thread "main" com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:342)
at com.rabbitmq.client.impl.recovery.RecoveryAwareAMQConnectionFactory.newConnection(RecoveryAwareAMQConnectionFactory.java:62)
at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.init(AutorecoveringConnection.java:99)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:900)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:859)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:817)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:954)
这是因为Rabbit里的queue 没有 注解@RabbitListener(queues = "namedQueue") queues的实例
解决方法:
添加监听的queues名称,保存 重启 。OK
Spring-boot集成RabbitMQ踩过的坑的更多相关文章
- Spring Boot 集成 RabbitMQ 实战
Spring Boot 集成 RabbitMQ 实战 特别说明: 本文主要参考了程序员 DD 的博客文章<Spring Boot中使用RabbitMQ>,在此向原作者表示感谢. Mac 上 ...
- Spring boot集成RabbitMQ(山东数漫江湖)
RabbitMQ简介 RabbitMQ是一个在AMQP基础上完整的,可复用的企业消息系统 MQ全称为Message Queue, 消息队列(MQ)是一种应用程序对应用程序的通信方法.应用程序通过读写出 ...
- 85. Spring Boot集成RabbitMQ【从零开始学Spring Boot】
这一节我们介绍下Spring Boot整合RabbitMQ,对于RabbitMQ这里不过多的介绍,大家可以参考网络上的资源进行安装配置,本节重点是告诉大家如何在Spring Boot中使用Rabbit ...
- RabbitMQ(3) Spring boot集成RabbitMQ
springboot集成RabbitMQ非常简单,如果只是简单的使用配置非常少,springboot提供了spring-boot-starter-amqp项目对消息各种支持. 资源代码:练习用的代码. ...
- spring boot集成RabbitMQ
原文:https://www.jianshu.com/p/e1258c004314 RabbitMQ作为AMQP的代表性产品,在项目中大量使用.结合现在主流的spring boot,极大简化了开发过程 ...
- Spring Boot 集成RabbitMQ
在Spring Boot中整合RabbitMQ是非常容易的,通过在Spring Boot应用中整合RabbitMQ,实现一个简单的发送.接收消息的例子. 首先需要启动RabbitMQ服务,并且add一 ...
- spring boot 集成 rabbitmq 指南
先决条件 rabbitmq server 安装参考 一个添加了 web 依赖的 spring boot 项目 我的版本是 2.5.2 添加 maven 依赖 <dependency> &l ...
- spring boot 集成 rabbitmq
1.使用默认的AmqpTemplate生产消费pojo时,pojo需要implement Serializable,否则会抛出org.springframework.amqp.AmqpExceptio ...
- spring boot 集成RabbitMQ的异常
com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.clos ...
随机推荐
- ServerSocket详解及线程阻塞_03
ServerSocket详解构造方法ServerSocket()ServerSocket(int port)ServerSocket(int port ,int backlog)serverSocke ...
- airflow笔记
airflow webserver --debug & # debug 模式,在后台启动webserver airflow list_dags airflow list_tasks tuto ...
- Linux命令:source
语法 source filename 说明 . 的同义词
- python框架django-web层
1.demo 命令行:django-admin startproject HelloWorld 命令执行成功后会根据模版生产一个django项目 然后通过 命令:python3 manage.py r ...
- Codeforces Round #436 E. Fire(背包dp+输出路径)
题意:失火了,有n个物品,每个物品有价值pi,必须在时间di前(小于di)被救,否则就要被烧毁.救某个物 品需要时间ti,问最多救回多少价值的物品,并输出救物品的顺序. Examples Input ...
- [TestNG] [WARN] Ignoring duplicate listener : org.testng.IDEATestNGRemoteListenerEx
1. 使用6.10,和6.14.3版本testng,出现多条warn信息 [TestNG] [WARN] Ignoring duplicate listener : org.testng.IDEATe ...
- oslo_db使用
oslo_db是openstak中封装数据库访问sqlachmy的模块,网上搜索的资源并不多,除了openstack官方文档,在实际使用中的例子凤毛麟角. 有感于资源太少,在学习heat源码的过程中, ...
- git clone失败
操作: $ git clone https://github.com/zjun615/DragListView.gitCloning into 'DragListView'...fatal: unab ...
- 19-07 【docker】随笔笔记
小tips: 1,在nginx的镜像中,并未包含ping工具: 2,在busybox的镜像中,是包含ping工具和telnet工具的,所以如果想测试互通性,可以利用busybox来检查: 实验1:利用 ...
- node重新加载模块
delete require.cache[require.resolve('module name')]; var my_module = require('module name');