|
|
|
@ -15,6 +15,7 @@ import org.apache.rocketmq.common.message.MessageExt;
|
|
|
|
|
import org.apache.rocketmq.remoting.common.RemotingHelper;
|
|
|
|
|
import org.springframework.context.ApplicationListener;
|
|
|
|
|
import org.springframework.context.event.ContextRefreshedEvent;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
@ -24,10 +25,10 @@ import java.util.List;
|
|
|
|
|
* date 2022/11/24 5:14 PM
|
|
|
|
|
*/
|
|
|
|
|
@Slf4j
|
|
|
|
|
//@Component
|
|
|
|
|
@Component
|
|
|
|
|
public class MqDemoService implements ApplicationListener<ContextRefreshedEvent> {
|
|
|
|
|
private static final String TOPIC = MqFactory.generateProdTopic("order_status_changed");
|
|
|
|
|
private static final String GROUP = "GID_payment";
|
|
|
|
|
private static final String TOPIC = MqFactory.generateProdTopic("miaoshougoods_test");
|
|
|
|
|
private static final String GROUP = "GID_miaoshougoods_test";
|
|
|
|
|
|
|
|
|
|
public void testSendMsg() {
|
|
|
|
|
DefaultMQProducer producer;
|
|
|
|
|