This example is a template example for implementing a server pool.
The ExampleServerPool class extends the internal implementation, NatsServerPool.
There are comments in the example code to explain the intention of each method in the interface and custom methods in the implementation.
ServerPool interface.
NatsServerPool implementation.
ExampleServerPool example code.
Main example how to initialize the connection with the custom implementation.
Unless otherwise noted, the NATS source files are distributed under the Apache Version 2.0 license found in the LICENSE file.