Dropwizard integration for working with Apache Cassandra.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Dropwizard Cassandra

For working with Cassandra in a Dropwizard application


Dropwizard Cassandra is published to Maven Central, so just add the module(s) you wish to use to your pom.xml:


Or whatever you need to do to make SBT/Gradle/Ivy/Buildr/etc. happy.

In your Configuration class, just add a CassandraClusterFactory member for configuration of the cluster connection:

class MyConfiguration extends Configuration {

    private CassandraClusterFactory cassandra = new CassandraClusterFactory();

    public CassandraClusterFactory getCassandraClusterFactory() {
        return cassandra;

    public void setCassandraClusterFactory(CassandraClusterFactory factory) {
        this.cassandra = factory;

Finally, in your Application class, build an instance of the client:

class MyApplication extends Application<MyConfiguration> {

    public void run(MyConfiguration configuration, Environment environment) {
        Cluster client = configuration

Cluster instances will be configured as defined by the CassandraClusterFactory and will automatically be managed as part of the application lifecycle.


Dropwizard Cassandra is versioned in lock-step with upstream Dropwizard. The versioning scheme for Dropwizard Cassandra is as follows:


The "release number" signifies the differences between two builds of Dropwizard Cassandra that are built against the same upstream version of Dropwizard.

The practical consequence of this is that an upgrade of Dropwizard Cassandra will often require an upgrade of Dropwizard itself, however, this is always clearly indicated by the version number of Dropwizard Cassandra itself.


This software is licensed under the Apache License Version 2.0