RabbitMQ मा, connection एक TCP connection को broker सँग हो, जबकि channel एक lightweight virtual connection हो जो connection भित्र छ। Channels लाई सही तरिकाले प्रयोग गर्नु (धेरै connections को सट्टा) दक्षता को लागि महत्वपूर्ण छ र एक साधारण 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)
