String memId = getMemQueueMessage(messageId);
if (cacheAvailable) {
try {
jedis.zadd(queue.getRelativeUrl() + "-" + shard + "-Q", System.currentTimeMillis() + (delaySeconds * 1000), memId); //insert or update already existing
//expire old message
jedis.zremrangeByScore(queue.getRelativeUrl() + "-" + shard + "-Q","-inf",String.valueOf(System.currentTimeMillis() -
(queue.getMsgRetentionPeriod() * 1000)));
} catch (JedisConnectionException e) {
trySettingCacheState(queue.getRelativeUrl(), shard, QCacheState.Unavailable);
}
logger.debug("event=send_message_batch cache_available=true msg_id= " + memId + " queue_url=" + queue.getAbsoluteUrl() + " shard=" + shard);