private Map<String, MessageAttributeValue> translateAttributes(Map<String, Object> headers, Exchange exchange) {
Map<String, MessageAttributeValue> result = new HashMap<String, MessageAttributeValue>();
HeaderFilterStrategy headerFilterStrategy = getEndpoint().getHeaderFilterStrategy();
for (Entry<String, Object> entry : headers.entrySet()) {
// only put the message header which is not filtered into the message attribute
if (!headerFilterStrategy.applyFilterToCamelHeaders(entry.getKey(), entry.getValue(), exchange)) {
Object value = entry.getValue();
if (value instanceof String) {
MessageAttributeValue mav = new MessageAttributeValue();
mav.setDataType("String");
mav.withStringValue((String)value);