From 2c34c4272c78d3052d73844f703249d0f9388cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E5=85=88=E7=91=9E?= <1490493387@qq.com> Date: Mon, 4 Apr 2022 21:42:57 +0800 Subject: [PATCH] =?UTF-8?q?refactor(CanalListener.java):=20Canal=E9=98=9F?= =?UTF-8?q?=E5=88=97=E8=B0=83=E6=95=B4=E5=8A=A8=E6=80=81=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/youlai/admin/component/listener/CanalListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/component/listener/CanalListener.java b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/component/listener/CanalListener.java index 808bac362..9c51f71ca 100644 --- a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/component/listener/CanalListener.java +++ b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/component/listener/CanalListener.java @@ -30,13 +30,14 @@ public class CanalListener { private final ISysOauthClientService oauthClientService; private final ISysMenuService menuService; - @RabbitListener(bindings = { + /*@RabbitListener(bindings = { @QueueBinding( value = @Queue(value = "canal.queue", durable = "true"), exchange = @Exchange(value = "canal.exchange"), key = "canal.routing.key" ) - }) + })*/ + @RabbitListener(queues = "canal.queue") public void handleDataChange(String message) { CanalMessage canalMessage = JSONUtil.toBean(message, CanalMessage.class); String tableName = canalMessage.getTable();