这是可能的,但这已经被称为HeaderMapper
.
请参阅以下选项Amqp.inboundAdapter()
:
/**
* Configure the adapter's {@link AmqpHeaderMapper};
* defaults to {@link DefaultAmqpHeaderMapper}.
* @param headerMapper the headerMapper.
* @return the spec.
*/
public S headerMapper(AmqpHeaderMapper headerMapper) {
this.target.setHeaderMapper(headerMapper);
return _this();
}
/**
* Only applies if the default header mapper is used.
* @param headers the headers.
* @return the spec.
* @see DefaultAmqpHeaderMapper#setRequestHeaderNames(String[])
*/
public S mappedRequestHeaders(String... headers) {
有关详细信息,请参阅DefaultAmqpHeaderMapper
JavaDocs 和各自的参考手册:https ://docs.spring.io/spring-integration/docs/5.3.2.RELEASE/reference/html/amqp.html#amqp-message-headers
因此,您可能需要的是!
标题名称模式上的否定运算符 ( )。