I'm wondering if there is a good way to transfer heavy objects (for example, arrays of >1mln strings) effectively via Rabbit queue.
What I tried was splitting the array on chunks by 1000, 10000, and 100000. The fastest I got was 21sec with 10000 chunk size.
The solution I came up with was something similar to streaming. There were 2 services, one sent to another a request object containing the temporal queue name (which was created right before sending the request). The latter gets the request and starts sending the array by chunks, and when it's over, it sends a kind of END-OF-STREAM sign.
Maybe there's some elegant solution for that, like some feature or library or whatever. The only condition is that the heavy object should be passed by using a message queue.
Have anyone encountered such a task?