ActiveMQ:我们可以使用单个消息发送多个文件吗
ActiveMQ: Can we send multiple files using single message
我想通过 ActiveMQ 消息发送一些字符串、一些整数和一些文件?可能吗 ?我知道 BlobMessages、ByteMessage 和 ObjectMessages,但 none 似乎可以回答我的问题。
有什么想法吗?
JSON comes to mind as a possible solution. Put your data into JSON objects, turn the JSON into a string, and stuff it into a TextMessage or turn the string into bytes and stuff it into a BytesMessage. You might run into problems with the ultimate size of the message. If so, you might want to move to ActiveMQ Artemis which supports arbitrarily large messages.
我想通过 ActiveMQ 消息发送一些字符串、一些整数和一些文件?可能吗 ?我知道 BlobMessages、ByteMessage 和 ObjectMessages,但 none 似乎可以回答我的问题。
有什么想法吗?
JSON comes to mind as a possible solution. Put your data into JSON objects, turn the JSON into a string, and stuff it into a TextMessage or turn the string into bytes and stuff it into a BytesMessage. You might run into problems with the ultimate size of the message. If so, you might want to move to ActiveMQ Artemis which supports arbitrarily large messages.