Unless you are using pipelines.yml the configuration files are concatenated, events from each input is sent through every filter and written to every output. You could do something like this, with a different magicvalue in each file.
input {
beats {
port => "5044"
add_field => { "[@metadata][somefield]" => "magicvalue" }
}
}
filter {
if "[@metadata][somefield]" == "magicvalue" {
...
}
}
output {
if "[@metadata][somefield]" == "magicvalue" {
...
}
}