quarkus

Quarkus mongodb integration

和自甴很熟 提交于 2019-12-11 16:45:20
问题 I'm using quarkus to build an application that needs to connect to MongoDB. However going over the documentation I could not find any module or guide that show me how can I do it: https://quarkus.io/ There is a guide about hibernate and JPA, but nothing about mongodb. Does anyone manage to do it? Can you share with me a repository with an example? 回答1: Latest versions of Quarkus have added MongoDB support. https://quarkus.io/guides/mongo-guide 回答2: I have use the following to access mongodb

Quarkus log tracing and equivalent to Spring Cloud Sleuth

偶尔善良 提交于 2019-12-11 15:51:39
问题 Log tracing is extremely important matter, so I played a little bit with this code, to match/connect request ids with the response ones. This works for tracing request responses from to/from my ws.rs resources: @Provider public class LoggingFilter implements ContainerRequestFilter, ContainerResponseFilter { private static final Logger LOG = Logger.getLogger(LoggingFilter.class); AtomicInteger _id = new AtomicInteger(0); AtomicInteger requestId = new AtomicInteger(0); @Context UriInfo info;

Quarkus with ActiveMQ?

五迷三道 提交于 2019-12-11 11:58:46
问题 After trying out Quarkus with Kafka I‘m wondering how to use it with ActiveMQ. I was not able to find any documentation. Quarkus.io mentions support for amqp protocoll. Does somebody know how to achieve this? 回答1: Additionally to the answer provided by @John Clingan (Thanks!) to use VertX directly, you can also use microprofile-reactive-messaging: The current version (0.0.7) of the smallrye amqp extension does not work with Quarkus (No empty Constructor for CDI). A fix is already in the

SmallRye Reactive Messaging's Emitter<>.send doesn't send in Kotlin via AMQP broker with Quarkus

情到浓时终转凉″ 提交于 2019-12-11 06:07:21
问题 Currently, I am trying to write a 'notification service' based on Maven, Quarkus and SmallRye Reactive Messaging in Kotlin. As a base I have an example in Java which works fine and I was trying to "translate" it into Kotlin. The way I want it to work is, that I send an HTTP request (e.g. GET http://localhost:8080/search/{word}) and the system sends the 'word' (here a String) to the queue 'queries' of the Artemis AMQP message Broker. Another system subscribes to the message Broker and fetches

quarkus: extension or not for JSF

限于喜欢 提交于 2019-12-11 04:27:05
问题 I would like to add JSF into Quarkus. I already included the servlet-api ( quarkus-undertow ). My question is: Do I need an appropriate extension (e.g., https://github.com/tandraschko/quarkus-myfaces) or is it enough to put only the the JSF-Mojarra -library (https://javaserverfaces.github.io/) in pom.xml ? <!-- run jsf in quarkus --> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-undertow</artifactId> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId

How can I configure the port a Quarkus application runs on?

时光毁灭记忆、已成空白 提交于 2019-12-05 23:38:12
问题 I would like my Quarkus application to run on a port other than the default. How can I accomplish that? 回答1: The Quarkus configuration property to be used is quarkus.http.port (the default value is 8080). If this property is set in application.properties then that value will be used. The property can also be overridden at runtime as follows: When running a Quarkus application in JVM mode you can set the port using the quarkus.http.port System property. For example: java -Dquarkus.http.port

使用Quarkus在Openshift上构建微服务的快速指南

人走茶凉 提交于 2019-11-29 18:19:21
在我的博客上,您有机会阅读了许多关于使用Spring Boot或Micronaut之类框架构建微服务的文章。这里将介绍另一个非常有趣的框架专门用于微服务体系结构,它越来越受到大家的关注– Quarkus 。它是作为下一代Kubernetes/Openshift原生Java框架引入的。它构建在著名的Java标准之上,如CDI、JAX-RS和Eclipse MicroProfile,这些标准将它与Spring Boot区别开来。 其他一些可能说服您使用Quarkus的特性包括非常快的启动时间、为在容器中运行而优化的最小内存占用,以及较短的首次请求时间。此外,尽管它是一个相对较新的框架(当前版本是0.21),但它有很多扩展,包括Hibernate、Kafka、RabbitMQ、Openapi和Vert.x等等。 在本文中,我将指导您使用Quarkus构建微服务,并在OpenShift(通过Minishift)上运行它们。我们将讨论以下主题: 构建基于rest的且包含输入校验的应用程序 微服务与RestClient之间的通信 开放健康检查(liveness, readiness) 开放OpenAPI /Swagger 文档 使用Quarkus Maven插件在本地机器上运行应用程序 使用JUnit和RestAssured进行测试 使用source

How to create a Jandex index in Quarkus for classes in a external module

岁酱吖の 提交于 2019-11-27 23:08:59
First of all, I have a multi-module maven hierarchy like that: ├── project (parent pom.xml) │ ├── service │ ├── api-library So now to the problem: I am writing a JAX-RS Endpoint in the service module which uses classes in the api-library. When I start quarkus, I am getting this warning: 13:01:18,784 WARN [io.qua.dep.ste.ReflectiveHierarchyStep] Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index: - com.example.Fruit - com.example.Car Consider adding them to the index either by creating a Jandex index for your dependency or via

How to create a Jandex index in Quarkus for classes in a external module

僤鯓⒐⒋嵵緔 提交于 2019-11-26 12:30:11
问题 First of all, I have a multi-module maven hierarchy like that: ├── project (parent pom.xml) │ ├── service │ ├── api-library So now to the problem: I am writing a JAX-RS Endpoint in the service module which uses classes in the api-library. When I start quarkus, I am getting this warning: 13:01:18,784 WARN [io.qua.dep.ste.ReflectiveHierarchyStep] Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index: - com.example.Fruit - com