How does RabbitMQ supports large number of virtual connections in form of channels from a single TCP connection? Does the same optimization seen in other technologies? How does the pseudo-code to support multiple channels from a single TCP connection look like?
相关问题
- Error message 'No handlers could be found for
- Tcp connection with Spring Integration framework
- How iperf calculates network statistics
- Wireshark dissector that works with tls/ssl
- RabbitMQ management plugin windows renders as blan
AMQP protocol declares in section 4.3 Channel Multiplexing:
The simplest pseudo-code for channel multiplexing may looks like
It is very basic meta-code which doesn't handle data consuming from multiple channel at the same time, but I hope the idea is clear.
The similar optimization (for me it doesn't looks like optimization because there are caveats like connection level exception inside one channel) usually appears in high-level libraries, like websocket-multiplex and definitely in various RabbitMQ client libraries.
Also RTMP protocol (streaming video and audio in flash) uses channel multiplexing where various streams are sent via single connection: