quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.44k stars 2.58k forks source link

Multitenancy for Hibernate Reactive #15959

Open DavideD opened 3 years ago

DavideD commented 3 years ago

Hibernate Reactive supports multitenancy but The hibernate reactive extension doesn't have an equivalent for the property hibernate.vertx.pool.class that's needed to pass a custom ReactiveConnectionPool.

quarkus-bot[bot] commented 3 years ago

/cc @Sanne, @gavinking

gavinking commented 3 years ago

I am still of the opinion that we should move away from depending on Hibernate stuff for multitenancy in Quarkus.

dpswds commented 3 years ago

If quarkus is not support for this, How can i add it by myself?

abuinitski commented 1 year ago

If quarkus is not support for this, How can i add it by myself?

By briefly looking for a couple of days for Quarkus Hibernate extensions, I don't think there is a way. It's not meant to be extended.

For my app (I needed multi-tenancy, and wanted it reactive), got an ugly and completely custom workaround. Simple and effective though. Details - https://stackoverflow.com/a/74224692/20350512

HknLof commented 1 year ago

I am still of the opinion that we should move away from depending on Hibernate stuff for multitenancy in Quarkus.

@gavinking Any recommendations on how to work with multi-tenancy in a reactive setting?

Would extending DefaultSqlClient, as mentioned in Hibernate work?

Or is it not part of the call stack within the io.quarkus:quarkus-hibernate-reactive extension?

DavideD commented 1 year ago

I don't think it will work because Quarkus uses its own SqlClientPool.

HknLof commented 1 year ago

Yepp, looks like it :(

https://github.com/quarkusio/quarkus/blob/main/extensions/hibernate-reactive/runtime/src/main/java/io/quarkus/hibernate/reactive/runtime/customized/QuarkusReactiveConnectionPoolInitiator.java

fruedaCode commented 1 year ago

Hello, I was also checking the hibernate reactive feature in quarkus with Panache which I found it awesome. I got really excited when I was going through the documentation I saw the multitenancy section.

So, Is there a plan so we can have this 2 features, reactive + multitenant?

Thank you!!

linktech1 commented 5 months ago

Has there been any movement on this issue? We have a team that is trying to use Hibernate Reactive and multitenancy?

DavideD commented 5 months ago

As far as I know, nobody is working on this issue.

cvgaviao commented 4 months ago

I am still of the opinion that we should move away from depending on Hibernate stuff for multitenancy in Quarkus.

@gavinking , can you share with us the alternatives for creating multitenancy apps with Quarkus without depending on Hibernate?