@Override protected Message<?> toMessage(Object object) { try { return this.inboundMapper.toMessage(object); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new MessagingException("failed to create Message", e); } }