INT-4482: AMQP: Fix Double ErrorMessage

JIRA: https://jira.spring.io/browse/INT-4482

The outer try/catch sends an `ErrorMessage` for all exceptions; it should
only do so for `MessageConversionException`. Integration flow exceptions
will have been already handled by `MessageProducerSupport`.

Also, populate the raw message header consistently - previously it only
was populated for flow exceptions. Although the LEFE contains the raw
message, it should be in the `ErrorMessage` header for consistency.

**cherry-pick to 5.0.x, 4.3.x**

* Polishing - PR Comments
This commit is contained in:
Gary Russell
2018-06-05 16:34:58 -04:00
committed by Artem Bilan
parent ee189a0155
commit 76bbbdd771
4 changed files with 164 additions and 20 deletions

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.support;
/**
* A map builder creating a map with String keys and values.
*
* @author Gary Russell
*
* @since 5.0.6
*/
public class StringObjectMapBuilder extends MapBuilder<StringObjectMapBuilder, String, Object> {
}