pzx6b666 opened a new issue, #764:
URL: https://github.com/apache/rocketmq-clients/issues/764
### Programming Language of the Client
Java
### Is Your Feature Request Related to a Problem?
final ClientServiceProvider provider =
ClientServiceProvider.loadService();
String topic = "yourNormalTopic";
final Producer producer = ProducerSingleton.getInstance(topic);
byte[] body = "This is a normal message for Apache
RocketMQ".getBytes(StandardCharsets.UTF_8);
String tag = "yourMessageTagA";
final Message message = provider.newMessageBuilder()
.setTopic(topic)
.setTag(tag)
.setKeys("yourMessageKey-1c151062f96e")
.setBody(body)
.build();
try {
final SendReceipt sendReceipt = producer.send(message);
log.info("Send message successfully, messageId={}",
sendReceipt.getMessageId());
} catch (Throwable t) {
log.error("Failed to send message", t);
}
producer.close();
### Describe the Solution You'd Like
1
### Describe Alternatives You've Considered
1
### Additional Context
1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]