This commit is contained in:
dute7liang
2024-01-14 03:38:50 +08:00
parent 7a6f9eecd3
commit d5deaacfe8
32 changed files with 323 additions and 135 deletions

View File

@@ -29,8 +29,8 @@ public class AmqpProducer {
CommonDelayDto dto = new CommonDelayDto();
dto.setType(type);
dto.setRoomId(roomId);
rabbitTemplate.convertAndSend(CheckTimeOutMqConfig.EXCHANGE_NAME,
CheckTimeOutMqConfig.ROUTING_KEY,
rabbitTemplate.convertAndSend(CommonDelayMqConfig.EXCHANGE_NAME,
CommonDelayMqConfig.ROUTING_KEY,
JSON.toJSONString(dto),
messagePostProcessor -> {
messagePostProcessor.getMessageProperties().setDelay(timeout*1000); // 设置延迟时间,单位毫秒