streadway / amqp

Go client for AMQP 0.9.1
http://godoc.org/github.com/streadway/amqp
BSD 2-Clause "Simplified" License
4.88k stars 621 forks source link

if the Conn:Channel ratio is not 1:1 please help me understand API #542

Open ORESoftware opened 1 year ago

ORESoftware commented 1 year ago

ChatGPT says this:

image

but the API is like this:

image

so how could I access any other channels associated with the TCP conn?

ORESoftware commented 1 year ago

nevermind, looks like you open a channel like this:


    ch1, err := conn.Channel()
    failOnError(err, "Failed to open a channel")
    defer ch1.Close()

    ch2, err := conn.Channel()
    failOnError(err, "Failed to open a channel")
    defer ch2.Close()

my only question - is there a default channel or is the default no channel?