Skip to content
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

RocketmqTemplate does not have a method to send delay messages in version 5.0 #506

Closed
john1337 opened this issue Dec 5, 2022 · 5 comments

Comments

@john1337
Copy link

john1337 commented Dec 5, 2022

Message message = new Message(TOPIC, ("Hello scheduled message " + i).getBytes(StandardCharsets.UTF_8));
// This message will be delivered to consumer 10 seconds later.
//message.setDelayTimeSec(10);
// The effect is the same as the above
// message.setDelayTimeMs(10_000L);
// Set the specific delivery time, and the effect is the same as the above
message.setDeliverTimeMs(System.currentTimeMillis() + 3600_000L);

想实现类似的功能没看到哪个接口支持,只找到了固定延迟级别的接口:
SendResult syncSend(String destination, Message<?> message, long timeout, int delayLevel)

@RongtongJin
Copy link
Contributor

Message message = new Message(TOPIC, ("Hello scheduled message " + i).getBytes(StandardCharsets.UTF_8)); // This message will be delivered to consumer 10 seconds later. //message.setDelayTimeSec(10); // The effect is the same as the above // message.setDelayTimeMs(10_000L); // Set the specific delivery time, and the effect is the same as the above message.setDeliverTimeMs(System.currentTimeMillis() + 3600_000L);

想实现类似的功能没看到哪个接口支持,只找到了固定延迟级别的接口: SendResult syncSend(String destination, Message<?> message, long timeout, int delayLevel)

当前RocketMQ-Spring支持到4.x,会尽快适配5.0

@RongtongJin RongtongJin changed the title rocketmqTemplate连发送延迟消息的接口都没有么 RocketmqTemplate does not have a method to send delay messages in version 5.0 Dec 8, 2022
@dfjfj
Copy link

dfjfj commented Dec 12, 2022

加油💪, 期待尽快适配5.0

@MartinDai
Copy link
Contributor

5.0也不支持任意指定延迟时间吧,商业版的才有

@zhouchunhai
Copy link
Contributor

@i will resolve it

RongtongJin pushed a commit that referenced this issue Jan 29, 2023
* support sync send message with arbitrarily delay time.

* support sync send message with arbitrarily delay time.

* fix check style error.
@mxsm
Copy link
Member

mxsm commented Jan 29, 2023

5.0也不支持任意指定延迟时间吧,商业版的才有

@MartinDai 社区5.0版本已经支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants