简体   繁体   中英

How to get the source route in the dead Letter channel?

I define a DeadLetterChannel. There I change some Values and save the MessageHistory into the exchange. Now I want to insert into the Headers from the exchange the Name of the Route where the exception happend. But I don't find any way to get the name of the source route.

Did anybody can help me?

You can get the route id from the exchange property with the key Exchange.FAILURE_ROUTE_ID

String routeId = exchange.getProperty(Exchange.FAILURE_ROUTE_ID);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM