From 626bb3aa189053a742cf04f66929f2a54fc9695c Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期四, 04 七月 2024 15:38:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java b/src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java index eb1420d..cbb528e 100644 --- a/src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java +++ b/src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java @@ -37,8 +37,13 @@ rabbitTemplate.convertAndSend("examExchange", "exam", message, msgCorrelationData); } - public void meetMsg(Integer examId, String jsonMsg, Long delayTime) { - rabbitTemplate.convertAndSend("examExchange","meet", "浣犲ソ锛孯abbitMQ"); + public void meetMsg(Integer meetId, String jsonMsg, Long delayTime) { + MessageProperties messageProperties = new MessageProperties(); + messageProperties.setExpiration(delayTime + ""); + Message message = MessageBuilder.withBody(jsonMsg.getBytes()).andProperties(messageProperties).build(); + // 璁剧疆娑堟伅鐨勫叧鑱旀暟鎹紝浠ヤ究鍙戦�佺‘璁ゅ洖璋冦�佹湭璺敱鎴愬姛娑堟伅鐨勫鐞� + MyCorrelationData msgCorrelationData = new MyCorrelationData(meetId + "", RabbitMqMsgTypeEnum.MEET); + rabbitTemplate.convertAndSend("meetExchange", "meet", message, msgCorrelationData); } } -- Gitblit v1.8.0