Persistent Entities and ReadSide Queries / Cassandra Session

(Vinaya Mandke) #1

I have implemented a ReadSideProcessor (followed the documentation) to save the entity state to a Cassandra table. I was wondering how should a readSide Query be performed, eg: How to pick a connection from connection Pool, and put it back etc. Does the Cassandra Session provided by the ReadSide Persistence provide this functionality under the hood? Are these sessions thread safe?
As far as I understand, for every unique object (eg: Users) created is mapped to one persistent entity. creating a new connection for it seems an overhead / inefficient. How can connection pools be managed?

(Alan Klikic) #2

@vmandke CassandraSession is handling connection pool under the hood. Also it is thread safe.