Registry /
messaging / rocketmq-spring-boot-starter
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
RocketMQTemplate
✓ org.apache.rocketmq.spring.core.RocketMQTemplate
Sends a message using RocketMQTemplate
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Example implements CommandLineRunner {
@Autowired
private RocketMQTemplate rocketMQTemplate;
public static void main(String[] args) {
SpringApplication.run(Example.class, args);
}
@Override
public void run(String... args) throws Exception {
rocketMQTemplate.convertAndSend("test-topic", "Hello, RocketMQ!");
}
}
Audit
Dependencies
No dependency data recorded yet.