11/*
2- * Copyright 2018-2021 the original author or authors.
2+ * Copyright 2018-2022 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2727import org .springframework .integration .mapping .HeaderMapper ;
2828import org .springframework .integration .support .utils .PatternMatchUtils ;
2929import org .springframework .messaging .MessageHeaders ;
30+ import org .springframework .messaging .support .NativeMessageHeaderAccessor ;
3031import org .springframework .util .Assert ;
3132import org .springframework .util .MimeType ;
3233import org .springframework .util .NumberUtils ;
4142 *
4243 * @param <A> the target message attribute type.
4344 * @author Artem Bilan
45+ * @author Christopher Smith
4446 * @since 2.0
4547 */
4648public abstract class AbstractMessageAttributesHeaderMapper <A > implements HeaderMapper <Map <String , A >> {
4749
4850 private static final Log logger = LogFactory .getLog (SqsHeaderMapper .class );
4951
50- private volatile String [] outboundHeaderNames = {"!" + MessageHeaders .ID , "!" + MessageHeaders .TIMESTAMP ,
51- "!" + AwsHeaders .MESSAGE_ID , "!" + AwsHeaders .QUEUE , "!" + AwsHeaders .TOPIC , "*" };
52+ private volatile String [] outboundHeaderNames = {
53+ "!" + MessageHeaders .ID ,
54+ "!" + MessageHeaders .TIMESTAMP ,
55+ "!" + NativeMessageHeaderAccessor .NATIVE_HEADERS ,
56+ "!" + AwsHeaders .MESSAGE_ID ,
57+ "!" + AwsHeaders .QUEUE ,
58+ "!" + AwsHeaders .TOPIC ,
59+ "*" ,
60+ };
5261
5362 /**
5463 * Provide the header names that should be mapped to a AWS request object attributes
@@ -58,8 +67,10 @@ public abstract class AbstractMessageAttributesHeaderMapper<A> implements Header
5867 * the names starting with {@code !} symbol, you have to escape it prepending with the
5968 * {@code \} symbol in the pattern definition. Defaults to map all ({@code *}) if the
6069 * type is supported by SQS. The {@link MessageHeaders#ID},
61- * {@link MessageHeaders#TIMESTAMP}, {@link AwsHeaders#MESSAGE_ID},
62- * {@link AwsHeaders#QUEUE} and {@link AwsHeaders#TOPIC} are ignored by default.
70+ * {@link MessageHeaders#TIMESTAMP},
71+ * {@link NativeMessageHeaderAccessor.NATIVE_HEADERS},
72+ * {@link AwsHeaders#MESSAGE_ID}, {@link AwsHeaders#QUEUE}, and
73+ * {@link AwsHeaders#TOPIC} are ignored by default.
6374 * @param outboundHeaderNames The inbound header names.
6475 */
6576 public void setOutboundHeaderNames (String ... outboundHeaderNames ) {
0 commit comments