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 2021/09/28 04:19:21 UTC

[GitHub] [pulsar-client-go] wolfstudy commented on issue #623: When topic is deleted forced, don't to tigger reconnect logic

wolfstudy commented on issue #623:
URL: https://github.com/apache/pulsar-client-go/issues/623#issuecomment-928768695


   And the java demo as follows:
   
   ```
   public static void main(String[] args) throws PulsarClientException {
           PulsarClient client = PulsarClient.builder()
                   .serviceUrl("pulsar://localhost:6650")
                   .build();
   
           final String topic = "test-topic-002";
           final int msgCount = 100000;
   
           Producer<byte[]> producer = client.newProducer()
                   .topic(topic)
                   .create();
           for (int i = 0; i < msgCount; i++) {
               String value = "new msg No." + i;
               MessageId msgId = producer.newMessage()
                       .value(value.getBytes())
                       .send();
               try {
                   Thread.sleep(1000);
               } catch (InterruptedException exception) {
                   exception.printStackTrace();
               }
               System.out.println("===>>> produce msg id:" + new String(msgId.toString()) + ", value:" + value);
           }
           producer.flush();
   }
   ```


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