*
* @param useBlockIO configuration param to {@link Client}
* @return {@link Client} instance
*/
public Client newReadingClient(boolean useBlockIO) {
final ClientImpl client = new ClientImpl(host, port, useBlockIO);
/* FIXME: There is a problem in JavaBeanstalkClient 1.4.4 (at least in 1.4.4),
when using uniqueConnectionPerThread=false. The symptom is that ProtocolHandler
breaks the protocol, reading incomplete messages. To be investigated. */
//client.setUniqueConnectionPerThread(false);
for (String tube : tubes) {
client.watch(tube);
}
return client;
}