How to forward logs from a logstash “agent” to “master”

At least in future I will need to connect to JMX beans.
Since we are monitoring large java server applications small footprint is not a requirement, there is enough memory in thats servers. Flexibility is the more important requirement.