I've been using processing.org to capture data from Arduinos. I haven't tried with an RPi yet, but the link here is dedicated to just that.
Processing is more geared for doing really fancy graphics, but its ability to capture data and put it to a file is great, and, of course, send data to the Arduino.
I am inexperienced in interprocess communication, but, apparently processing can put the data out to MQTT check this link
Let me know how that works out for you!