I'm implementing the request/reply pattern in RabbitMQ using Java. I know that channels are not thread-safe, so use 1 channel per consumer/thread.
I wonder if there are any problems or inefficienies when a single channel is used both to consume and publish messages, or receive requests and return responses in my case, like the code below, it's from here:
channel.basicConsume(RPC_QUEUE_NAME, false, consumer);
channel.basicPublish("", props.getReplyTo(), replyProps, response.getBytes());
Should I use two different channels for consuming and publishing messages?