视频链接
一.:代码实现(~)
1:AmqpConfig:
@Configuration
public class AmqpConfig {
@Autowired
public RabbitTemplate rabbitTemplate;
@Bean
public MessageConverter messageConverter() {
return new Jackson2JsonMessageConverter();
}
}
2:RabbitConfig:
package com.example.demo.mq;
import com.rabbitmq.client.impl.AMQImpl;
import org.springframework.amqp.core.AmqpAdmin;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
/**
* @author zhangxudong@chunyu.me
* @date 2022/4/19 11:41 上午
*/
@Component
public class RabbitConfig {
@Autowired
public AmqpAdmin amqpAdmin;
public static final String HELLO_EXCHANGE = "hello.exchange";
public static final String HELLO_QUEUE = "hello.queue";
public static final String HELLO_EXCHANGE_QUEUE_ROUTING_KEY = "hello.exchange.queue.routing.key";
@Bean
public void createExchange() {
DirectExchange directExchange = new DirectExchange(HELLO_EXCHANGE, true, false);
amqpAdmin.declareExchange(directExchange);
}
@Bean
public void createQueue() {
Queue queue = new Queue(HELLO_QUEUE, true, false, false, null);
amqpAdmin.declareQueue(queue);
}
@Bean
public void createBinding() {
Binding binding = new Binding(
HELLO_QUEUE,
Binding.DestinationType.QUEUE,
HELLO_EXCHANGE,
HELLO_EXCHANGE_QUEUE_ROUTING_KEY,
null);
amqpAdmin.declareBinding(binding);
}
}
3:PublishController:
package com.example.demo.mq;
import com.example.demo.vo.User;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.connection.CorrelationData;
import org.springframework.amqp.rabbit.connection.RabbitResourceHolder;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.UUID;
/**
* @author zhangxudong@chunyu.me
* @date 2022/4/19 11:38 上午
*/
@RestController
public class PublishController {
@Autowired
public RabbitTemplate rabbitTemplate;
@RequestMapping(value = "/send")
public String send() {
for (int i = 0; i < 1; i++) {
User user = new User("张三", i);
HashMap<String, String> hashMap = new HashMap<>();
rabbitTemplate.convertAndSend(
RabbitConfig.HELLO_EXCHANGE,
RabbitConfig.HELLO_EXCHANGE_QUEUE_ROUTING_KEY,
user,
// 发送时,设置消息的唯一 id,并可以把此消息,保存到 redis 数据库中存储
// 定时扫描,没有投递的在发送一次
new CorrelationData(UUID.randomUUID().toString()));
}
return "发送:" + ":成功";
}
}
4:MyRabbitListen:
package com.example.demo.mq;
import com.example.demo.vo.User;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
/**
* @author zhangxudong@chunyu.me
* @date 2022/4/19 12:55 下午
*/
@Component
public class MyRabbitListen {
@RabbitListener(queues = {RabbitConfig.HELLO_QUEUE})
public void myListen1(Channel channel, Message message, User user) throws IOException {
System.out.println(user);
try {
// 消息ID
// 是否批量确认
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
} catch (Exception e) {
// 3 个参数:( true:消息可重新入队 )( false:消息丢弃 )
channel.basicNack(message.getMessageProperties().getDeliveryTag(), false, true);
// 2 个参数:( 不是批量牵签收 )
channel.basicReject(message.getMessageProperties().getDeliveryTag(), true);
}
}
}
二.:保证消息可靠(259~260)
可靠投递概述:
1:确认模式:ConfirmCallback
1)说明:
-1:只是确认 borker 收到消息,并不表示:从交换机投递到队列。
-2:只要消息抵达 broker,会调就为:true。
2)配置:
spring:
rabbitmq:
virtual-host: /
addresses: 192.168.124.38
port: 5672
username: admin
password: 123
# 开启发布端确认
publisher-confirms: true
3)代码实现:
/**
* @author zhangxudong@chunyu.me
* @date 2021/12/21 7:31 上午
*/
@Configuration
public class AmqpConfig {
@Autowired
public RabbitTemplate rabbitTemplate;
@Bean
public MessageConverter messageConverter() {
return new Jackson2JsonMessageConverter();
}
/**
* 定制 rabbitTemplate
*/
@PostConstruct // AmqpConfig 对象创建完以后,执行这个方法
public void initRabbitTemplate() {
/**
* 发布确认回调
*/
rabbitTemplate.setConfirmCallback((correlationData, b, s) -> {
// 发送消息时,把消息保存到 数据库 中,收到消息后标记为成功状态。
// 定时扫描,没有投递的在发送一次
System.out.println("当前消息的唯一关联数据(消息的唯一 ID):" + correlationData); // [id=b18d3929-b163-495d-8df8-8d4f3dd28916]
System.out.println("消息是否成功收到:" + b); // true
System.out.println("失败的原因:" + s); // null
});
}
}
2:抵达队列确认:ReturnCallback
1)说明:
2)配置文件:
spring:
rabbitmq:
virtual-host: /
addresses: 192.168.124.38
port: 5672
username: admin
password: 123
# 消息抵达队列确认
publisher-returns: true
# 只要抵达队列,以异步方式,优先会调
template:
mandatory: true
3)代码实现:
/**
* @author zhangxudong@chunyu.me
* @date 2021/12/21 7:31 上午
*/
@Configuration
public class AmqpConfig {
@Autowired
public RabbitTemplate rabbitTemplate;
@Bean
public MessageConverter messageConverter() {
return new Jackson2JsonMessageConverter();
}
/**
* 定制 rabbitTemplate
*/
@PostConstruct // AmqpConfig 对象创建完以后,执行这个方法
public void initRabbitTemplate() {
/**
* 发布确认回调
*/
rabbitTemplate.setConfirmCallback((correlationData, b, s) -> {
// 发送消息时,把消息保存到 数据库 中,收到消息后标记为成功状态。
System.out.println("当前消息的唯一关联数据(消息的唯一 ID):" + correlationData); // [id=b18d3929-b163-495d-8df8-8d4f3dd28916]
System.out.println("消息是否成功收到:" + b); // true
System.out.println("失败的原因:" + s); // null
});
/**
* 消息抵达队列回调(只要消息,没有投递到指定的队列,就触发)
*/
rabbitTemplate.setReturnCallback((message, replyCode, replyText, exchange, routingKey) -> {
System.out.println("失败的消息:" + message);
System.out.println("回复的状态吗:" + replyCode);
System.out.println("回复文本内容:" + replyText);
System.out.println("消息的交换机:" + exchange);
System.out.println("消息的路由键:" + routingKey);
});
}
}
3:消费端 确认:Ack 消息确认机制
1)说明:只要没有明确告诉 mq 消息被签收,消息就一直在 unacked 状态,即使 mq 宕机,消息也不会丢失。
2)配置文件:
spring:
rabbitmq:
virtual-host: /
addresses: 192.168.124.38
port: 5672
username: admin
password: 123
# 开启发布端确认
publisher-confirms: true
# 消息抵达队列确认
publisher-returns: true
# 只要抵达队列,以异步方式,优先会调
template:
mandatory: true
# 手动确认模式
listener:
simple:
acknowledge-mode: manual
3)代码实现:
/**
* @author zhangxudong@chunyu.me
* @date 2022/4/19 12:55 下午
*/
@Component
public class MyRabbitListen {
@RabbitListener(queues = {RabbitConfig.HELLO_QUEUE})
public void myListen1(Channel channel, Message message, User user) throws IOException {
System.out.println(user);
try {
// 消息ID
// 是否批量确认
// 是否重新入队
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
} catch (Exception e) {
// 3 个参数:( true:消息可重新入队 )( false:消息丢弃 )
channel.basicNack(message.getMessageProperties().getDeliveryTag(), false, true);
// 2 个参数:( 不是批量牵签收 )
channel.basicReject(message.getMessageProperties().getDeliveryTag(), true);
}
}
}
-1:
-2:
-3:
-4:
-5:
4):
-1:
-2:
-3:
-4:
-5:
5):
-1:
-2:
-3:
-4:
-5:
4::
1):
-1:
-2:
-3:
-4:
-5:
2):
-1:
-2:
-3:
-4:
-5:
3):
-1:
-2:
-3:
-4:
-5:
4):
-1:
-2:
-3:
-4:
-5:
5):
-1:
-2:
-3:
-4:
-5:
5::
1):
-1:
-2:
-3:
-4:
-5:
2):
-1:
-2:
-3:
-4:
-5:
3):
-1:
-2:
-3:
-4:
-5:
4):
-1:
-2:
-3:
-4:
-5:
5):
-1:
-2:
-3:
-4:
-5:
6::
1):
-1:
-2:
-3:
-4:
-5:
2):
-1:
-2:
-3:
-4:
-5:
3):
-1:
-2:
-3:
-4:
-5:
4):
-1:
-2:
-3:
-4:
-5:
5):
-1:
-2:
-3:
-4:
-5:
三.:(~)
1::
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