RabbitMQ-ல், connection என்பது broker-க்கு ஒரு TCP connection ஆகும், அதேவேளை channel என்பது ஒரு connection-ன் உள்ளே ஒரு lightweight virtual connection ஆகும். Channels-ஐ சரியாகப் பயன்படுத்துவது (பல connections-ஐ விட) efficiency-க்கு முக்கியமாகும் மற்றும் ஒரு பொதுவான best practice ஆகும்.
Connections vs channels
CONNECTION → a TCP connection to the RabbitMQ broker:
→ relatively HEAVY (a real network connection, with overhead to establish/maintain)
CHANNEL → a lightweight, virtual connection MULTIPLEXED over a single TCP connection:
→ many channels share one connection → lightweight; most operations happen on channels
→ publishing, consuming, declaring queues → done via channels
→ one connection can have MANY channels (multiplexing reduces TCP overhead)
