【发布时间】:2023-02-17 22:35:21
【问题描述】:
我正在检查 this guide 使用 Quarkus 从 SQS 消费。
问题是我想在无限循环中执行此操作,例如每 10 秒获取一次新消息,然后使用 Hibernate Reactive 从消息中插入一些数据到数据库中。
我创建了一个 Quarkus Scheduler,但由于它不支持返回 Uni,我不得不阻止来自 Hibernate 反应的响应,并得到这个错误
2022-02-16 15:01:24,058 ERROR [de.sup.tea.con.SqsConsumer] (vert.x-eventloop-thread-9) Finished with error!: io.smallrye.mutiny.CompositeException: Multiple exceptions caught:
[Exception 0] io.vertx.core.impl.NoStackTraceThrowable: Timeout
[Exception 1] java.lang.IllegalStateException: HR000061: Session is currently connecting to database
使用 Quarkus 和反应式实现我需要的最佳方法是什么?
【问题讨论】:
标签: amazon-sqs quarkus