Quantcast
Channel: DataStax Support Forums » Recent Topics
Viewing all articles
Browse latest Browse all 387

acarrascal on "Multiple Cluster/Session in Java Driver"

$
0
0

I'm not sure how to proceed when using multiple simultaneous conections to Cassandra by means of Datastax Java Driver.
Regarding concurrent connections to cassandra documentation says:
"Session instances are thread-safe and usually a single instance is all you need per application. However, a given session can only be set to one keyspace at a time, so one instance per keyspace is necessary. Your application typically only needs a single cluster object, unless you're dealing with multiple physical clusters."

But, what if I have several Cluster objects (with a Session each) in different threads and applications trying to communicate with the same Cassandra keyspace? Is it possible? Is there any concurrency problem?

Thanks in advance


Viewing all articles
Browse latest Browse all 387

Trending Articles