Why do we need channels, you might ask? Why not just issue AMQP commands directly over the TCP connection? The main reason is because setting up and tearing down TCP sessions is expensive for an operating system. Let’s say your app consumes messages from a queue and spins threads up or down based on service demand. If all you had were TCP connections, each thread would need its own connection to Rabbit, which could mean hundreds of connections per second during high load periods. Not only would this be a massive waste of TCP connections, but an ...
- Chapter 2. Understanding messaging
- from RabbitMQ in Action: Distributed messaging for everyone
- Publisher: Manning Publications
- Released: May 2012
Share this highlighthttp://www.safaribooksonline.com/a/rabbitmq-in-action/3177/