zhurunhua opened a new issue, #369:
URL: https://github.com/apache/rocketmq-clients/issues/369
In the introduction document page. I found these code that can specify a
Unix timestamp to send a delay message:
```
// Send delay messages.
MessageBuilder messageBuilder = null;
// Specify a millisecond-level Unix timestamp. In this example, the
specified timestamp indicates that the message will be delivered in 10 minutes
from the current time.
Long deliverTimeStamp = System.currentTimeMillis() + 10L * 60 * 1000;
Message message = messageBuilder.setTopic("topic")
// Specify the message index key. The system uses the key to
locate the message.
.setKeys("messageKey")
// Specify the message tag. The consumer can use the tag to
filter messages.
.setTag("messageTag")
.setDeliveryTimestamp(deliverTimeStamp)
// Configure the message body.
.setBody("messageBody".getBytes())
.build();
try {
// Send the messages. Focus on the result of message sending and
exceptions such as failures.
SendReceipt sendReceipt = producer.send(message);
System.out.println(sendReceipt.getMessageId());
} catch (ClientException e) {
e.printStackTrace();
}
```
But I didn't find the implementation for this feature in the source code of
version 5.0. So please tell me the truth
Thanks a lot
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]