You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/14 09:07:40 UTC

[GitHub] [pulsar] john1337 opened a new issue, #15171: delay message deliver lost messages

john1337 opened a new issue, #15171:
URL: https://github.com/apache/pulsar/issues/15171

   **Describe the bug**
   i am using pulsar's delay message feature,when i increate message count to 10000,consumer will only get 5000 messages or so ,other messages were lost,1000 delay message deliver worked well.
   
   producer code:
           SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
           for(int i=0;i<10000;i++){
               producer.createMessage("clicks2","hello world"+sdf.format(new Date()))
                       .deliverAfter(1L, TimeUnit.MINUTES).sendAsync();
           }
   
   consumer code:
       private AtomicInteger count = new AtomicInteger(0);
   
       @PulsarConsumer(topic="clicks2",subscriptionType= SubscriptionType.Shared,clazz=String.class)
       public void consume(String msg) {
           SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
           log.info("msg:{},收到数据时间:{}",msg,sdf.format(new Date()));
           int total = count.incrementAndGet();
           log.info("总共收到数据量:{}",total);
       }
   


-- 
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: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] john1337 commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] john1337 commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
john1337 commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1100030197

   
   
   
   > This is no related with delay message, you can check the internal stats after you finished producing messages. `pulsar-admin topics stats-internal topic-name` check the `entriesAddedCounter`. @john1337
   
   ![image](https://user-images.githubusercontent.com/11956341/163561383-5ad64346-db54-437a-811d-656d6a9272bc.png)
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] liudezhi2098 commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
liudezhi2098 commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1098909107

    can provided more information? eg, pulsar version,  and topic state info.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] john1337 commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
john1337 commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1099832539

   i test many times,lost messages do exist,so i think it's unreliable to use pulsar to delay message deliver


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] john1337 commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
john1337 commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1104842484

   > This is no related with delay message, you can check the internal stats after you finished producing messages. `pulsar-admin topics stats-internal topic-name` check the `entriesAddedCounter`. @john1337
   
   can you get any problems in the pic?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1133802318

   The issue had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] john1337 commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
john1337 commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1098912992

   > can provided more information? eg, pulsar version, and topic state info.
   
   pulsar:2.9.2


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] gaozhangmin commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1100018718

   This is no related with delay message, you can check the internal stats after you finished producing messages.
   `pulsar-admin topics stats-internal topic-name`  check the `entriesAddedCounter`. @john1337 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] gaozhangmin commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
gaozhangmin commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1099983904

   @john1337  I cannot reproduce this issue. Could you mind  list the steps?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on issue #15171: delay message deliver lost messages

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #15171:
URL: https://github.com/apache/pulsar/issues/15171#issuecomment-1161108811

   The issue had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org