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 2019/11/23 12:47:13 UTC

[GitHub] [pulsar] codelipenghui edited a comment on issue #5727: NPE when create message meta builder

codelipenghui edited a comment on issue #5727: NPE when create message meta builder
URL: https://github.com/apache/pulsar/issues/5727#issuecomment-557795140
 
 
   The following demo can reproduce:
   
   ```java
   PulsarClient client = PulsarClient.builder().serviceUrl("pulsar://127.0.0.1:6650").build();
           Producer<byte[]> producer = client.newProducer().topic("test").create();
           TypedMessageBuilder<byte[]> messageBuilder = producer.newMessage();
           for (int i = 0; i < 1000; i++) {
               messageBuilder.key(i + "").value(new byte[128]).sendAsync();
           }
   ```
   It's better to add check for TypedMessageBuilder, because it can only send once.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services