Closed DavidSantacruzR closed 1 year ago
see guideline provided by rabbit community https://github.com/gftea/amqprs/discussions/78#discussioncomment-5524344
Besides the guides, I don't see any issue with treating channels as resources (as if it was a file or socket) and making your consumer implementation own it. Then you will have to make sure the consumer instance lives long enough.
However, you can also initialize the connection(s), channel(s) and connection recovery code in the main
function or similar code path in your app, and make consumers borrow the resources they need.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
I'm building a wrapper to your library, and recently came across a problem to prevent a channel connection from being dropped. So, the question is, should each queue have their own channel or is it better to have one channel, and bind multiple queues to it?
Which one is considered bad practice?
For example:
Approach: one
Approach: two
My problem with my current approach is that when binding a queue to a channel, I'm unable to prevent the channel from being dropped.
Any advice is much appreciated.