The other problem would be that kafka has no idea of the serdes you use in your messages ie it only sees the key and value as bytes so it would be difficult to implement generic filtering in the broker.
for your second problem it seems that creating separate topics for respective destinations solves your problem. Another option would be to implement your own filtering proxy with some other api (say streaming grpc) with knowledge of your data. And run this close to your brokers. Zero-copy is out of the question and you get the full traffic from broker to filtering proxy. We did this, but for a multi-tenant use case where we did not want to expose kafka externaly but still needed streaming. /svante > > >