|
|
@@ -1,10 +1,9 @@
|
|
|
package com.mrxu.framework.starter.rocketmq;
|
|
|
|
|
|
+import com.mrxu.framework.starter.rocketmq.bean.MessageBody;
|
|
|
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.messaging.Message;
|
|
|
-import org.springframework.messaging.support.MessageBuilder;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
/**
|
|
|
@@ -27,7 +26,7 @@ public class RocketMQSender {
|
|
|
private Long messageTimeOut;
|
|
|
|
|
|
public void sendMsg(String topic,String tag,Object body) {
|
|
|
- rocketMQTemplate.syncSend(topic+":"+tag,body,messageTimeOut);
|
|
|
+ rocketMQTemplate.syncSend(topic+":"+tag,new MessageBody(tag,body),messageTimeOut);
|
|
|
}
|
|
|
|
|
|
/* *//**
|