Sending binary file through RabbitMQ

后端 未结 3 1907
暗喜
暗喜 2020-12-10 12:02

I\'m spec\'ing a design right now that uses RabbitMQ as a message queue. The message are going to have a JSON body, and for one message in particular I\'d like to add a smal

3条回答
  •  伪装坚强ぢ
    2020-12-10 12:30

    We use RabbitMQ and file transfer. It's working a little slow, but for updating far away customers it is duable. I would recommend you following guidelines: Create a message structure for each block you send with command, offset and CRC32, data length, maximum 60kByte per block of data, give blocks a counter, do a sha256 at the end to make sure data is correct, make tar optional so the data can be much smaller and transmission is faster.. make a directory thing, to see which files need to update... use a broadcast event to see who's available and update 1 customer at a time with client.company.update orso, where a customer listens to .company. have fun! p.s. we also created a linux-service for this, which starts automatic at the customer.

提交回复
热议问题