Last active
May 27, 2017 19:15
-
-
Save mzimecki/43cd3971f21ec42ec8669aa989c1341e to your computer and use it in GitHub Desktop.
Mock endpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void configureMockEndpoint() throws Exception { | |
final AdviceWithRouteBuilder mockAdvice = new AdviceWithRouteBuilder() { | |
@Override | |
public void configure() throws Exception { | |
replaceFromWith("direct:deadLetterQueueMock"); | |
interceptSendToEndpoint("jms:*") | |
.skipSendToOriginalEndpoint() | |
.process(exchange -> exchange.getIn().setBody(TEST_BODY_PAYLOAD)); | |
}; | |
}; | |
context().getRouteDefinition(ServiceConstants.QUEUE_READER_ROUTE_ID).adviceWith(context(), mockAdvice); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment