datastax / cassandra-quarkus

An Apache Cassandra(R) extension for Quarkus
Apache License 2.0
39 stars 28 forks source link

Enable configuring NodeStateListener From Quarkus Configurations #182

Closed DebajitKumarPhukan closed 3 years ago

DebajitKumarPhukan commented 3 years ago

Problem Statement: At present there is no way to configure NodeStateListener from Quarkus configurations unlike other advanced configurations. It helps to put configurations in one place instead of creating another "application.conf" file.

Example: quarkus.cassandra.nodestatelistener=com.mypackagae.MyListener

┆Issue is synchronized with this Jira Task by Unito

adutra commented 3 years ago

Thanks for bringing that up, I think it would be a valid addition to the project. I also opened https://datastax-oss.atlassian.net/browse/JAVA-2951 on the driver side because I think we could even support a list of listeners, as in:

quarkus.cassandra.nodestatelisteners=com.mypackage.MyListener1,com.mypackage.MyListener2
DebajitKumarPhukan commented 3 years ago

@adutra Great ! Eagerly awaiting for the arrival.

adutra commented 3 years ago

Hi, this is released in 1.1.1 today.

Example of configuration:

quarkus.cassandra.request-trackers=\
  com.datastax.oss.driver.internal.core.tracker.RequestLogger,\
  com.datastax.oss.quarkus.tests.driver.MyRequestTracker
quarkus.cassandra.schema-change-listeners=com.datastax.oss.quarkus.tests.driver.MySchemaChangeListener
quarkus.cassandra.node-state-listeners=com.datastax.oss.quarkus.tests.driver.MyNodeStateListener
DebajitKumarPhukan commented 3 years ago

@adutra Thanks a lot for introducing this feature.