send:
Message msg = new Message (/ /
// Topic Topic
"RocketMQ_test_by_bsy",
// Message Tag,
// Gmail Consumer MQ
"TagA",
// Message Body
// MQ
// Producer Consumer
"Hello MQ".getBytes());
accept:
Consumer consumer = ONSFactory.createConsumer (properties);
consumer.subscribe("RocketMQ_test_by_bsy", "*", new MessageListener() {
public Action consume(Message message, ConsumeContext context) {
System.out.println("Receive: " + message);
return Action.CommitMessage;
}
});