Just need to verify whether this is true: if one attempts to set a message priority via @Header annotation, such as:
They will get an IllegalArgumentException from this line:Code:@Gateway(requestChannel="fooChannel") public abstract void bar(String msg, @Header(MessageHeaders.PRIORITY) MessagePriority priority);
Anyway around this by still using @Gateway or do I have to resort to a MessageBuilder or a MessageChannelTemplate?Code:public class ArgumentArrayMessageMapper implements InboundMessageMapper<Object[]> { [...] @SuppressWarnings("unchecked") private Message<?> mapArgumentsToMessage(Object[] arguments) { [...] else if (annotation.annotationType().equals(Header.class)) { Header headerAnnotation = (Header) annotation; String headerName = this.determineHeaderName(headerAnnotation, methodParameter); if (headerName.startsWith(MessageHeaders.PREFIX)){ throw new IllegalArgumentException("Attempting to set header: " + headerName + ". Prefix: '" + MessageHeaders.PREFIX + "' is reservered for SI internal use"); } [...] } [...] }
Thank you in advance.


Reply With Quote