THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
The close(timeout) should work when called from a user caller thread or the internal sender thread.
When timeout is 0negative, it fails all unsent messages and close the producer without waiting.
When timeout is 0, it will block forever waiting for all the pending send request to finish.
Because it is possible the close(timeout) is called for multiple times, it has to be idempotent.
...