문제

I have an app in which for each received message it publishes N in the same channel. I'm wondering whether it'd be better to have two channel, a Publish channel and a Receive channel.

What would it be the best practice?

도움이 되었습니까?

해결책

Best practice is to have one channel per consumer/ queue. I would say that would extend to publishing on a different channel as consuming.

다른 팁

To add to the above answer, channels are essentially cost-free. A "channel" in RabbitMQ is just an integer that is tacked on to the raw packet indicating what channel it is for. The underlying TCP stream is still the same. There is a negligible additional amount of resources consumed by keeping track of all the different channels on the client and server side, but this is really only a problem if you are creating close to the maximum number of channels.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top