Given I have IntegrationFlow
:
IntegrationFlows.from(
Amqp.inboundAdapter(rabbitConnectionFactory, NTF_INCOMING_CMSF_EVENT_QUEUE)
.messageConverter(new Jackson2JsonMessageConverter(jacksonObjectMapper))
)
.get()
I'd like to apply HeaderFilter to the AMQP inbound adapter, but it seems I can only do it later in the pipeline.
Is it possible to filter headers in inbound adapter?
It is possible, but that is called already a
HeaderMapper
.See these options of that
Amqp.inboundAdapter()
:For further details see
DefaultAmqpHeaderMapper
JavaDocs and this respective reference Manual: https://docs.spring.io/spring-integration/docs/5.3.2.RELEASE/reference/html/amqp.html#amqp-message-headersSo, probably what you need is a negation operator (
!
) on header name patterns.