janwesterkamp commented on issue #6856: URL: https://github.com/apache/camel-quarkus/issues/6856#issuecomment-2523144402
In the comments you can see my two tries to enforce a worker thread: ``` //@Blocking private void createAPIRestAdapter() { restConfiguration() .clientRequestValidation(true) .enableCORS(true) .inlineRoutes(false) .apiContextPath("/api/openapi") .apiProperty("api.title", "Data Processing API") .apiProperty("api.version","0.1.0") .apiProperty("api.description", "REST API."); rest("/api") .put("/{productId}").description("Creates an image from product ID") .id("data-processing-put") //.outType(String.class) .param().name("productId").type(RestParamType.path).description("Product ID.").dataType("String").endParam() .param().name("Accept").type(RestParamType.header).defaultValue(MediaType.IMAGE_PNG).description("Image type").endParam() .produces(MediaType.IMAGE_PNG) .responseMessage().code(200).message(HttpStatusCode._200_MESSAGE).endResponseMessage() .responseMessage().code(201).message(HttpStatusCode._201_MESSAGE).endResponseMessage() .responseMessage().code(204).message(HttpStatusCode._204_MESSAGE).endResponseMessage() .responseMessage().code(400).message(HttpStatusCode._400_MESSAGE).endResponseMessage() .responseMessage().code(404).message(HttpStatusCode._404_MESSAGE).endResponseMessage() .responseMessage().code(405).message(HttpStatusCode._405_MESSAGE).endResponseMessage() .responseMessage().code(406).message(HttpStatusCode._406_MESSAGE).endResponseMessage() .responseMessage().code(415).message(HttpStatusCode._415_MESSAGE).endResponseMessage() .responseMessage().code(500).message(HttpStatusCode._500_MESSAGE).endResponseMessage() .responseMessage().code(501).message(HttpStatusCode._501_MESSAGE).endResponseMessage() .to(DIRECT_PUT_MAIN_ROUTE) .get("/{productId}/{dataType}").description("Fetches an image from product ID.") .id("data-processing-get") .param().name("productId").type(RestParamType.path).description("Product ID.").dataType("String").endParam() .param().name("Accept").type(RestParamType.header).defaultValue(MediaType.IMAGE_PNG).description("Image type").endParam() .produces(MediaType.IMAGE_PNG) .responseMessage().code(200).message(HttpStatusCode._200_MESSAGE).endResponseMessage() .responseMessage().code(204).message(HttpStatusCode._204_MESSAGE).endResponseMessage() .responseMessage().code(400).message(HttpStatusCode._400_MESSAGE).endResponseMessage() .responseMessage().code(404).message(HttpStatusCode._404_MESSAGE).endResponseMessage() .responseMessage().code(405).message(HttpStatusCode._405_MESSAGE).endResponseMessage() .responseMessage().code(406).message(HttpStatusCode._406_MESSAGE).endResponseMessage() .responseMessage().code(415).message(HttpStatusCode._415_MESSAGE).endResponseMessage() .responseMessage().code(500).message(HttpStatusCode._500_MESSAGE).endResponseMessage() .to(DIRECT_GET_MAIN_ROUTE) ; } ``` To keep it simple, I omittet some complexitiy of my use case like POST and HEAD and other variants of the API. But in the best case, having a way to only asign a worker thread to the PUT (not in GET) would be nice to benefit from reactivity in the GET calls. I will test to add camel-quarkus-platform-http - instead of the camel-quarkus-vertx-http extension, right? These are a shortend list of my enxtensions incurrently in use: ``` ... <properties> <compiler-plugin.version>3.13.0</compiler-plugin.version> <maven.compiler.release>21</maven.compiler.release> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id> <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id> <quarkus.platform.version>3.17.3</quarkus.platform.version> <surefire-plugin.version>3.5.0</surefire-plugin.version> <jandex-plugin.version>3.2.0</jandex-plugin.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>${quarkus.platform.group-id}</groupId> <artifactId>${quarkus.platform.artifact-id}</artifactId> <version>${quarkus.platform.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>${quarkus.platform.group-id}</groupId> <artifactId>quarkus-camel-bom</artifactId> <version>${quarkus.platform.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-log</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-direct</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-bean</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-openapi-java</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-rest</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-vertx-http</artifactId> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-arc</artifactId> </dependency> <!-- CamelQuarkusTestSupport--> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-junit5</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> <scope>test</scope> </dependency> </dependencies> ... ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org