congbobo184 opened a new issue #14436:
URL: https://github.com/apache/pulsar/issues/14436


   **Describe the bug**
   
![image](https://user-images.githubusercontent.com/39078850/155444823-a7283952-bc22-49e7-99b3-8b2df6a8f7f4.png)
   parse message metadata throw Exception
   **To Reproduce**
   Steps to reproduce the behavior:
   1. start up a standalone pulsar, the version is bigger than 2.10.0
   2. change broker config 
   transactionCoordinatorEnabled=true
   managedLedgerMaxEntriesPerLedger=3
   managedLedgerMinLedgerRolloverTimeMinutes=1
   3. config namespace ttl ./pulsar-admin namespaces set-message-ttl -ttl 10  
public/default
   4. ```        int sendTopicsCount = 500;
           String topicName = "test";
           List<Producer<String>> producers = new ArrayList<>(sendTopicsCount);
   
           for (int i = 0; i < sendTopicsCount; i++) {
               
producers.add(pulsarClient.newProducer(Schema.STRING).sendTimeout(0, 
TimeUnit.SECONDS).topic(i + topicName).create());
               Consumer<String> consumer = 
pulsarClient.newConsumer(Schema.STRING).subscriptionName("test").topic(i + 
topicName).subscribe();
               consumer.closeAsync();
           }
           for (int i = 0; i < sendTopicsCount; i++) {
               Transaction transaction = 
pulsarClient.newTransaction().withTransactionTimeout(10, 
TimeUnit.SECONDS).build().get();
               System.out.println("send one transaction messageId" + 
producers.get(i).newMessage(transaction).value(i + topicName).send() + "   
topic name : " + i);
               transaction.commit();
               producers.get(i).closeAsync();
               Thread.sleep(100);
           }```
   Execute the above code multiple times.
   Execute `./pulsar-admin namespaces unload public/default` multiple times.
   4. See error
   
![image](https://user-images.githubusercontent.com/39078850/155444823-a7283952-bc22-49e7-99b3-8b2df6a8f7f4.png)
   **Expected behavior**
   can't throw exception
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   **Desktop (please complete the following information):**
    - OS: [e.g. iOS]
   
   **Additional context**
   Add any other context about the problem here.
   


-- 
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]


Reply via email to