Send Images using RabbitMQ

人走茶凉 提交于 2020-01-03 02:54:09
问题 I want to transfer an image from a client to the server using RabbitMQ. However, from whatever I read, I understood that RabbitMQ can only transfer a stream of text. So how to transfer an image? 回答1: The amqp body is a buffer, you can send what you want. In general, if you want to send a file, you have to read it and send the buffers. You should send the file using more publish and not just one, then recreate the file on the consumer side. You should avoid sending big buffer. 来源: https:/