I was trying out a Citrus testcase where I make an HTTP call whose internal implementation sends a message to Kafka which I am planning to validate with the test case. If I write multiple testcases for this which I run parallely, I want to be able to filter the Kafka message I am planning validate using a header value for which I tried out message selector but that seems to work only for JMS. Is there a way I can use similar feature for Kafka.
This is what I tried with Kafka but selector doesn't seem to work:
Map<String, String> selectorMap = new HashMap<>();
selectorMap.put("ce_traceid", "randomstringg");
$(receive()
.endpoint(todoKafkaEndpoint)
.selector(selectorMap)
.message()
.header("ce_source", "eventsourcev1"));