john1337 commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1099991106
> @john1337 I cannot reproduce this issue. Could you mind list the steps?
producer code:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
for(int i=0;i<500000;i++){
producer.createMessage("clicks2","hello world"+sdf.format(new Date()))
.deliverAfter(1L, TimeUnit.MINUTES).sendAsync();
}
consumer code:
private AtomicInteger count = new AtomicInteger(0);
//
private final int max = 500000;
@PulsarConsumer(topic="clicks2",subscriptionType=
SubscriptionType.Shared,clazz=String.class)
public void consume(String msg) {
int total = count.incrementAndGet();
if(total == 1){
log.info("开始接收数据:{}",msg);
} else if(total == max) {
log.info("total:{},最后一条数据:{}",total,msg);
// 重新初始化
count.set(0);
}
}
increate message counts to 50,0000,you may make it happen
--
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]