Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upspring-cloud-starter-stream-rocketmq期望支持阿里云RocketMQ定时消息(不是延时消息) #791
Comments
|
是支持的 头信息传入 [__STARTDELIVERTIME]: 指定时间 |
|
DefaultMQProducerImpl 的 739行... 不知道为啥官方不在加个header的key~ |
|
__STARTDELIVERTIME 设过了然而不起作用 |
|
RocketMQ Binder 现在只支持 DELAY 这个 header |
|
DELAY 这个header 在开源的RocketMq是可以用 但是在阿里云RocketMq 也是起不了作用! |
|
期望尽早支持这个特性 |
|
@jojozoo 开源是Delay 传入等级,阿里云是__STARTDELIVERTIME 传入指定时间,阿里云上面必须建延迟topic,不是普通类型。。 目前正在用。。。 |
|
可以发个示例代码? |
|
|
@Nitsuya 可以发个示例代码? |
|
@jojozoo 就是你发的这样,走的topic要走阿里云的延迟topic。 我用的 版本0.9.0 |
|
我这边死活不成功 怎么设置都是死活延时1分30秒左右 |
|
@fangjian0423 能做个官方demo? |
|
producer code snipper: Message msg = MessageBuilder.withPayload("simple msg")
.setHeader("DELAY", 3).build();
source.output().send(msg);
System.out.println("msg send at " + DateFormatUtils
.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));configurations: spring.cloud.stream.rocketmq.binder.name-server=nameServerInAliwareMQ
spring.cloud.stream.rocketmq.binder.access-key=ak
spring.cloud.stream.rocketmq.binder.secret-key=sk
spring.cloud.stream.bindings.output.destination=instanceId%test-topic
spring.cloud.stream.bindings.output.content-type=application/json
spring.cloud.stream.rocketmq.bindings.output.producer.sync=true |
|
need |
|
@Nitsuya DefaultMQProducerImpl 的 739行... 不知道为啥官方不在加个header的key~ |
|
need __STARTDELIVERTIME header |
|
@jojozoo
|
|
@Nitsuya 我这边测试成功了 就是云上控制台上消息查询不出了 |
|
@fangjian0423 按照你的配置使用output默认Source是可以的。但是自定义source跟源码sync源码未赋值 |





现象:使用ONS连接阿里云RocketMq,可支持阿里云RocketMQ定时消息(不是延时消息) ,使用rocketmq stream binder则不能支持,只能支持到延时消息 。