Skip to content

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

Closed
@john1337

Description

@john1337

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions