Merge branch '2.1.x'

This commit is contained in:
Marcin Grzejszczak
2019-09-17 17:20:03 +02:00
3 changed files with 6 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ public class CamelStubMessages implements MessageVerifier<Message> {
ConsumerTemplate consumerTemplate = this.context.createConsumerTemplate();
Exchange exchange = consumerTemplate.receive(destination,
timeUnit.toMillis(timeout));
return exchange.getIn();
return exchange != null ? exchange.getIn() : null;
}
catch (Exception e) {
log.error("Exception occurred while trying to read a message from "