if (!(destinationChannel instanceof MessageSelectingQueueChannel)) {
throw new CitrusRuntimeException("Message channel type '" + endpointConfiguration.getChannel().getClass() +
"' does not support selective receive operations.");
}
MessageSelector messageSelector = new DispatchingMessageSelector(selector, endpointConfiguration.getBeanFactory());
MessageSelectingQueueChannel queueChannel = ((MessageSelectingQueueChannel) destinationChannel);
if (timeout <= 0) {
message = endpointConfiguration.getMessageConverter().convertInbound(queueChannel.receive(messageSelector), endpointConfiguration);
} else {