Skip to content

Commit

Permalink
[ISSUE apache#1120] Add new feature: support namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
lollipopjin committed Mar 28, 2019
1 parent 58ca482 commit 266732a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static void main(String[] args) throws Exception {
Message message = new Message("topicTest", "tagTest", "Hello world".getBytes());
try {
SendResult result = producer.send(message);
System.out.println("Topic:" + message.getTopic() + " send success, msgId is:" + result.getMsgId());
System.out.printf("Topic:%s send success, misId is:%s%n", message.getTopic(), result.getMsgId());
} catch (Exception e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private static void dealWithPullResult(PullResult pullResult) {
return;
}
pullResult.getMsgFoundList().stream().forEach(
(msg) -> System.out.println("Topic is:" + msg.getTopic() + "msgId is:" + msg.getMsgId()));
(msg) -> System.out.printf("Topic is:%s, msgId is:%s%n" , msg.getTopic(), msg.getMsgId()));
}

private static void putMessageQueueOffset(MessageQueue mq, long offset) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public static void main(String[] args) throws Exception {
defaultMQPushConsumer.subscribe("topicTest", "*");
defaultMQPushConsumer.registerMessageListener((MessageListenerConcurrently)(msgs, context) -> {
msgs.stream().forEach((msg) -> {
System.out.println("Msg topic is:" + msg.getTopic() + " MsgId is:" + msg.getMsgId());
System.out.printf("Msg topic is:%s, MsgId is:%s, reconsumeTimes is:%s%n", msg.getTopic() , msg.getMsgId(), msg.getReconsumeTimes());
});
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
return ConsumeConcurrentlyStatus.RECONSUME_LATER;
});

defaultMQPushConsumer.start();
Expand Down

0 comments on commit 266732a

Please sign in to comment.