Uploaded image for project: 'Spring Data for Apache Cassandra'
  1. Spring Data for Apache Cassandra
  2. DATACASS-293

CassandraCqlSessionFactoryBean Configure Multiple Clusters

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Works as Designed
    • Affects Version/s: 1.4.1 (Hopper SR1)
    • Fix Version/s: None
    • Component/s: Core, Infrastructure
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      I can't seem to find any information on this so I am logging a bug but I have a problem where I have a single app that needs to connect to different Cassandra clusters. Basically in the end I need two CassandraOperations that go against different clusters.

      I was trying to do this by declaring two CassandraClusterFactoryBean's and making them unique but this seems to be a problem as the CassandraClusterFactoryBean wants to be a singleton and cannot seem to support multiple clusters.

      I spent some time trying to make this work but I can't seem to get the right java config. As an alternative I was thinking of creating the Cassandra sessions manually then in Java spring config create the two different clusters.

      I am not sure if what I am describing makes sense, please let me know if you need more examples. I am hopeful I am just configuring this wrong so if this is the case I can do a pull request and update the documentation.

        Attachments

          Activity

            People

            Assignee:
            mp911de Mark Paluch
            Reporter:
            mbazos Michael Bazos
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              4 years, 16 weeks, 5 days ago