Skip to content

rabbitmq消费者初始化没有声明exchange #75

@qiuyunduo

Description

@qiuyunduo

bug描述

在com.github.paicoding.forum.service.notify.service.impl.RabbitmqServiceImpl类的consumerMsg方法中没有声明exchange的代码

在初始化的时候如果本地的rabbitmq中没有自己创建"direct.exchange"会出现找不到exchange错误。

复现
image

image

报错描述
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no exchange 'direct.exchange' in vhost '/', class-id=50, method-id=20)

bug复现步骤:

bug产生原因(若您已发现具体的bug产生原因,请直接贴上,也可以提merge进行修复)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions