Skip to content

Update RabbitmqServiceImpl.java #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update RabbitmqServiceImpl.java
修改变量名为路由键
  • Loading branch information
Yuan-9 authored Mar 23, 2025
commit cee990a3e015ebedbfdd1ac16508d99b89cdb2d6
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public boolean enabled() {
@Override
public void publishMsg(String exchange,
BuiltinExchangeType exchangeType,
String toutingKey,
String routingKey,
String message) {
try {
//创建连接
Expand All @@ -49,7 +49,7 @@ public void publishMsg(String exchange,
// 声明exchange中的消息为可持久化,不自动删除
channel.exchangeDeclare(exchange, exchangeType, true, false, null);
// 发布消息
channel.basicPublish(exchange, toutingKey, null, message.getBytes());
channel.basicPublish(exchange, routingKey, null, message.getBytes());
log.info("Publish msg: {}", message);
channel.close();
RabbitmqConnectionPool.returnConnection(rabbitmqConnection);
Expand Down