Chen Yu
Chen Yu

Reputation: 4077

one connection, two channel. big message

If for one client, it establishs one connection and in this connection it creates two channel. It start to send one big message (5MB) through the first channel to the rabbitmq's exchange. The network's speed is low, for example, 100kb per second. And one second later, it start to send another small message (10kb) through the second channel to the another rabbitmq's exchange.

Is the second message (10kb) won't be send any byte until the first message (5MB) has completed?

Upvotes: 2

Views: 148

Answers (1)

johlo
johlo

Reputation: 5500

Messages are split into frames, and frames from different channels can be interleaved on the same connection. This means that your second (smaller) message doesn't have to wait for the first to finish, the 5MB message is split into several frames (given RabbitMQ's default max frame size of 128KB) and sending of the frames for both messages will be interleaved.

Upvotes: 1

Related Questions