@StreamListener(target = Sink.INPUT, condition = "headers['eventType']=='EmployeeTransferredEvent'"

Hi @ajinkyasagar,

So 2 things:

  1. I just want to ask you to consider if filtering at the topic level might make sense. Think about what you want to filter on and ask, is this something that should be in our topic hierarchy? Is it something that others would want to filter on? If the answer is yes and you can still change the topic I’d consider that as it will allow for optimal performance. You can learn more about Topic Best Practices here
  2. Now to your question, with the deprecation of @StreamListener you can no longer filter on the bean itself, but instead you would use Spring Cloud Function’s Routing Function capabilities. Following this pattern will essentially have your routing function receive incoming messages and then intelligently route them to your other functions for processing.

Hope that helps!