This file contains hidden or 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
| onException(JsonValidationException.class) | |
| .handled(true) | |
| .setHeader(Exchange.HTTP_RESPONSE_CODE, constant(400)) | |
| .to("kafka:error-topic?brokers=localhost:29092") | |
| .setBody().constant("Invalid json data"); | |
| from("rest:post:booking") | |
| .to("json-validator:ui-schema.json") | |
| .to("kafka:bookings?brokers=localhost:29092") | |
| .setBody().constant("OK"); |
This file contains hidden or 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
| from("rest:post:booking") | |
| .to("kafka:bookings?brokers=localhost:29092"); |
This file contains hidden or 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
| public class SimpleRoute extends RouteBuilder { | |
| @Override | |
| public void configure() { | |
| // here | |
| } | |
| } |
This file contains hidden or 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
| { | |
| "customerId": 6, | |
| "providerId": 28, | |
| "bicycleId": 496, | |
| "fromDate": "2022-03-14", | |
| "toDate": "2022-03-14" | |
| } |
This file contains hidden or 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
| package org.sharedpool; | |
| import org.apache.camel.builder.RouteBuilder; | |
| import org.apache.camel.component.mock.MockEndpoint; | |
| import org.apache.camel.spi.Registry; | |
| import org.apache.camel.spi.TransactedPolicy; | |
| import org.apache.camel.support.SimpleRegistry; | |
| import org.apache.camel.test.junit5.CamelTestSupport; | |
| import org.junit.jupiter.api.Test; |