mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2025-01-05 18:42:22 +08:00
refactor(CanalListener.java): Canal队列调整动态创建
This commit is contained in:
parent
8dcc4af291
commit
2c34c4272c
@ -30,13 +30,14 @@ public class CanalListener {
|
|||||||
private final ISysOauthClientService oauthClientService;
|
private final ISysOauthClientService oauthClientService;
|
||||||
private final ISysMenuService menuService;
|
private final ISysMenuService menuService;
|
||||||
|
|
||||||
@RabbitListener(bindings = {
|
/*@RabbitListener(bindings = {
|
||||||
@QueueBinding(
|
@QueueBinding(
|
||||||
value = @Queue(value = "canal.queue", durable = "true"),
|
value = @Queue(value = "canal.queue", durable = "true"),
|
||||||
exchange = @Exchange(value = "canal.exchange"),
|
exchange = @Exchange(value = "canal.exchange"),
|
||||||
key = "canal.routing.key"
|
key = "canal.routing.key"
|
||||||
)
|
)
|
||||||
})
|
})*/
|
||||||
|
@RabbitListener(queues = "canal.queue")
|
||||||
public void handleDataChange(String message) {
|
public void handleDataChange(String message) {
|
||||||
CanalMessage canalMessage = JSONUtil.toBean(message, CanalMessage.class);
|
CanalMessage canalMessage = JSONUtil.toBean(message, CanalMessage.class);
|
||||||
String tableName = canalMessage.getTable();
|
String tableName = canalMessage.getTable();
|
||||||
|
Loading…
Reference in New Issue
Block a user