Skip to content

Is there a design principle that prevents exposing channel IDs at the API level? #283

Answered by Zerpet
HakShak asked this question in Q&A
Discussion options

You must be logged in to vote

Channel IDs are just an incrementing number, and channels are associated to a connection. In other words, you can have many channels with ID 0, each of them belonging to a different connection. IIRC, the channel ID in the client (SDK) does not match the channel name in the server. In the server, the channel name is something like <[email protected]>.

To answer your question: Is there a way to access it? No, not really. Since those IDs are not in sync with the channel name in the server, I don't think it will be very helpful to expose that information.

I understand that it may be difficult to correlate a channel error back to the actual channel just from the amqp.Error struct. I…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@HakShak
Comment options

@Zerpet
Comment options

Answer selected by HakShak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants