try {
if (exp > 0) {
jedis.set(queueUrl + "-" + shard + suffix, "Y");
jedis.expire(queueUrl + "-" + shard + suffix, exp); //expire after exp seconds
} else {
jedis.del(queueUrl + "-" + shard + suffix);
}
} catch (JedisException e) {
brokenJedis = true;
throw e;
} finally {