...
|
...
|
@@ -42,7 +42,7 @@ public class ExSendMsg { |
|
|
Connection connection = ConnectionUtil.getConnection(hostIp,hostPort,vHostName,userName,password);
|
|
|
// 从连接中创建通道
|
|
|
Channel channel = connection.createChannel();
|
|
|
// 声明(创建)队列
|
|
|
// 声明(创建)交换
|
|
|
channel.exchangeDeclare(exchangeName, exchangeType,true);
|
|
|
// 消息内容
|
|
|
channel.basicPublish(exchangeName, routingKey, null, msg.getBytes(StandardCharsets.UTF_8));
|
...
|
...
|
|