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 small binary file.
What I'd like to know is, should the binary file's data be part of the JSON message, or can it be appended to the message separately?
The message is a single byte stream, it also contains a header but that is less relevant. I suggest that you take one of two approaches. Your JSON object contains a field that is the byte stream of the binary file. Alternatively it gives the address where the file can be downloaded. If the binary file is small then the former should work fine. Otherwise you may prefer the latter.