Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/cn/Example_Delay.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class ScheduledMessageConsumer {
public static void main(String[] args) throws Exception {
// Instantiate message consumer
DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("ExampleConsumer");
// 设置NameServer地址
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use English comments here to match the existing code style.

consumer.setNamesrvAddr("localhost:9876");
// Subscribe topics
consumer.subscribe("TestTopic", "*");
// Register message listener
Expand Down Expand Up @@ -46,6 +48,8 @@ public class ScheduledMessageProducer {
public static void main(String[] args) throws Exception {
// Instantiate a producer to send scheduled messages
DefaultMQProducer producer = new DefaultMQProducer("ExampleProducerGroup");
// 设置NameServer地址
producer.setNamesrvAddr("localhost:9876");
// Launch producer
producer.start();
int totalMessagesToSend = 100;
Expand Down
Loading