Question

I am using Cassandra Java Driver 2.0 in asynchronous mode. When I am executing a lot of operations very intensively they must be queued somewhere inside driver before they sent to network.

I would like to set the queue size limit. I haven't found any Java Driver parameters for that. Also I expect something similar to RejectedExecutionHandler mechanism in ThreadPoolExecotor. Is it possible to do somehow with Cassandra Java Driver?

Was it helpful?

Solution

AFAIK you can't set the queue size limit. What you need is possibly the PoolingOptions. The queuing depends on the nodes capability of accepting more requests. If what you're trying is to tune the capability before queueing probably PoolingOptions is the answer, if what you want is to tune the max-size of the queue to reject further requests, afaik, you can't. However you can always pull an improvement-request here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top