How to get Hibernate Reactive and Azure async SDK working in Mutiny? #1602
Unanswered
RJJdeVries
asked this question in
Q&A
Replies: 1 comment
-
All I can say is that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I'm having some trouble implementing Hibernate Reactive Panache while also using the async client of Azure Blob SDK (which uses Project Reaktor under the hood).
I'm creating a Quarkus microservice and I'm trying out some reactive stuff.
I have a handler which does a couple of things in order:
Now my Azure Blob adapter integration test is working fine. I am able to upload one or more blobs to an Azurite container running locally.
It gets interesting when I run the integration test for my handler. I get the following error message:
org.hibernate.HibernateException: java.lang.IllegalStateException: HR000069: Detected use of the reactive Session from a different Thread than the one which was used to open the reactive Session - this suggests an invalid integration; original thread [265]: 'vert.x-eventloop-thread-1' current Thread [243]: 'reactor-http-nio-4'
So I have implemented a BlobHandler which uses the async client to upload blobs. In a nutshell, I use the AdaptersToFlow.publisher() to wrap the async call.
I am using the blob handler in my main handler, like this:
These are some excerpts, since its company code.
Now I have tried some stuff with the Mutiny method .runSubscriptionOn(MutinyHelper.executor(vertx.getOrCreateContext())) , but I then get an error message stating 'not using duplicated context'. I've also tried
.emitOn()
, but that also doesn't work.Does anyone know how to get these two (Hibernate Panache Reactive and Azure Async Blob SDK) to work together nicely? It's getting a little frustrating now.
Beta Was this translation helpful? Give feedback.
All reactions