The issue was resolved by using the force_array => true for the xml plugin. So my current filter looks like the below -
filter {
mutate {
convert => ["time", "integer"]
}
xml {
source => "message"
store_xml => false
force_array => false
target => "httpSample"
xpath => [
"/httpSample/@ts", "time",
"/httpSample/@lb", "label",
"/httpSample/@rc", "response_code",
"/httpSample/@rm", "response_message",
"/httpSample/responseHeader/text()", "response_header",
"/httpSample/requestHeader/text()","request_header",
"/httpSample/responseData/text()","response_data",
"/httpSample/java.net.URL/text()","request_url",
"/httpSample/method/text()","method"
]
}
date {
match => ["time", "UNIX_MS"]
target => "@timestamp"
}
}