camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Stevenson <>
Subject [DISCUSS] Adding a getMessage default methods to the Exchange interface
Date Tue, 16 Jan 2018 16:04:13 GMT
I’d like to add the following to the Exchange interface.

default Message getMessage() {
    return hasOut() ? getOut() : getIn();

default <T> T getMessage(Class<T> type) {
    return hasOut() ? getOut(type) : getIn(type);

I’ve run a across the same error about a dozen times now with customers (where the work
on the wrong message), and a simple addition to the Exchange interface would really help.

Since this would change a core interface in Camel, I wanted to get some feedback before I
made the change.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message