I spotted problem with Quarkus CqlSession. When i calling method "prepare" its hang and timeout. Code snippet:
@Inject
public NewsEngineRepository(QuarkusCqlSession quarkusCqlSession, NewsEngineConfig newsEngineConfig, Logger log) {
queryLimit = newsEngineConfig.dbQueryLimit();
this.quarkusCqlSession = quarkusCqlSession;
this.log = log;
SimpleStatement ss = SimpleStatement.newInstance("select " + ITEMID + ", " + PUBDATE + " from news_engine_items where defverid = ? AND group = ? Limit " + queryLimit);
preparedStatement= quarkusCqlSession.prepare(ss); // <---- hangs here
this.log.info("Prepared statement created successfully: " + ss.getQuery());
}
I found a two solutions:
- Increasing property quarkus.vertx.eventLoopsPoolSize from 2 to 4
- Setting properyty quarkus.cassandra.use-quarkus-event-loop to false
Can anyone explain why solution 1 works?