Disadvantages of NIO in ActiveMQ

I was working on setting up an ActiveMQ broker, and one thing that bothers me is that everything I read describes that NIO is “a good choice if you need to scale” or “something to look at “more speed,” so my question is: why don’t they just say “always use NIO?” All that I read are advantages, but there are apparently reasons not to use it (otherwise it will only be by default). What they are?

+5
source share
2 answers

Complexity. It is usually simpler to register 1 stream for each connection.

In addition, I think that NIO may be a little slower in the case of a small volume (1, 2, 3 connections). As a rule, you should not design a system to work well in the case of a small volume .. but if you know that you will never have> 2 connections for the application ... maybe NIO is too overloaded / really harmful.

+3
source

NIO , . , NIO- TCP, - . , NIO, , TCP. , , NIO .

+3

All Articles