There currently is not something in place in the framework which let’s you do the filtering.
That would thus mean it would be custom code from your end.
You could most definitely do that based on annotations, which I’d argue is very doable as well.
Live you’ve already suggested, you could write your own SpringAMQPPublisher, which on every incoming event checks if it contains the expected annotation.
If that annotation is in place on the event message it’s payload type, you can let it pass through, yes or no.
That’s my take on the matter, hope it helps you out Filip.