apache / apache/rocketmq-spring

[Enhancement] Enhance the send delayed message interface to include a message send timeout.

Open
#676 1 comment 35 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.3k
Forks
943
PR merge metrics
No merged PRs in 30d

Description

### Before Creating the Enhancement Request

- [X] I have confirmed that this should be classified as an enhancement rather than a bug/feature.

### Summary

Multiple overloaded methods of `RocketMQTemplate#syncSendDelayTimeSeconds` do not support a custom `timeout` parameter.

The `RocketMQTemplate#syncSend` method that supports custom configurations is private.

```java
/**
* Same to {@link #syncSend(String, Message)} with send timeout and delay time specified in addition.
* This function is only valid when the broker version is 5.0 or above
*
* @param destination formats: `topicName:tags`
* @param message {@link org.springframework.messaging.Message}
* @param timeout send timeout with millis
* @param delayTime delay time for message
* @return {@link SendResult}
*/
private SendResult syncSend(String destination, Message message, long timeout, long delayTime, DelayMode mode) {
// ......
}
```

### Motivation

Hope to include a custom `timeout` parameter when sending any delayed messages.

### Describe the Solution You'd Like

Add an additional overloaded method for `RocketMQTemplate#syncSendDelayTimeSeconds`, or change the visibility of the `RocketMQTemplate#syncSend` method to public.

If you agree with this enhancement, I can submit a PR.

### Describe Alternatives You've Considered

Add an additional overloaded method for `RocketMQTemplate#syncSendDelayTimeSeconds`, or change the visibility of the `RocketMQTemplate#syncSend` method to public.

If you agree with this enhancement, I can submit a PR.

### Additional Context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.