Hey everyone,
as you can tell from the subject, I'm playing around with the vertx eventbus and I'd like to ask you for any advice or hints on my solution.
The given scenario is that I'd like to send large file dumps (1-2GB) over a bridged (TCPEventbusBridge) eventbus.
So far I've had 2 approaches, which I'm not totally confident about.
- Approach 1: Dedicated Worker verticle reads from file chunks (FileInputStream) and sends them encoded in JSON to the destination verticle
--> Problem: JVM goes out of memory, because the eventbus is congested due to the high amount of JSON massages
- Approach 2: Every file chunk is requested and acknowledged sequentially, such that there are never 2 chunks on the bus at the same time
--> Probem: I haven't implemented this,yet. But it seems to have a high impact on the performance
Topology:
A------> B -----------------------------> C
TCPEventbusBridge
The files are stored on A and should be received by C.
How do you guys implement this? Is there any built-in way to accomplish my filetransfers? Maybe using the pump?
Thanks, Dom