Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • close(0, TimeUnit.MILLISECONDS) - do not wait, fail all the incomplete requests and close the producer.
  • close(10000, TimeUnit.MILLISECONDS) - wait at most 10 seconds for the producer to send pending messages, if messages cannot be sent in 10 seconds, let the sender thread fail the rest of messages, wait for sender thread to complete and close producer.
  • close(-1, TimeUnit.MILLISECONDS) - IllegalArgumentException will be thrown.

...