use of org.springframework.jms.core.MessagePostProcessor in project spring-integration by spring-projects.
the class JmsSendingMessageHandler method handleMessageInternal.
@Override
protected void handleMessageInternal(final Message<?> message) throws Exception {
if (message == null) {
throw new IllegalArgumentException("message must not be null");
}
Object destination = this.determineDestination(message);
Object objectToSend = (this.extractPayload) ? message.getPayload() : message;
MessagePostProcessor messagePostProcessor = new HeaderMappingMessagePostProcessor(message, this.headerMapper);
try {
DynamicJmsTemplateProperties.setPriority(new IntegrationMessageHeaderAccessor(message).getPriority());
this.send(destination, objectToSend, messagePostProcessor);
} finally {
DynamicJmsTemplateProperties.clearPriority();
}
}
Aggregations