I don't see why you want a separate input for each JMX object, but if you do you will need to use a different directory for the configuration file of each one.
If you set an alias like that then the events will have fields like
"metric_path" => "kafka.connect.foo.bar.baz",
"metric_value_string" => "Yowzer"
You could do something like
mutate { add_field => { "[@metadata][routing]" => "%{metric_path}" } }
mutate { gsub => [ "[@metadata][routing]", "^(\w+\.\w+).*", "\1" ] }
which gets the alias into that field. You can then use pipeline-to-pipeline with a distributor pattern based on the alias to get each type in its own pipeline.
This use of two fields to contain the metric_path and metric_value reminds me of JMS, where you get a hash containing request and value fields, and the value field is hash full of response objects. To actually use the data you need to completely restructure things. Of course the way to restructure things will depend on your use case. It is unlikely to be as simple as
mutate { add_field => { "%{metric_path}" => "%{metric_value_string}" } }
not least because sometimes that's going to have to be
"%{metric_value_number}".