You do not need to change the client from tcp or somehow to NIO, the broker is the only party that will use or have any benefit from NIO, since the client supports one open connection. Even if you make changes to NIO, the code is smart enough to know that the client is requesting NIO and swaps in the TCP factory, so in the end you will still get the same thing.
source share