code: void processTedQueue() {
  		int totalProcessing = context.taskManager.calcWaitingTaskCountInAllChannels();
  		if (totalProcessing >= TaskManager.LIMIT_TOTAL_WAIT_TASKS) {
  			logger.warn("Total size of waiting tasks ({}) already exceeded limit ({}), skip this iteration (2)", totalProcessing, TaskManager.LIMIT_TOTAL_WAIT_TASKS);
  			return;
  		}
  		Channel channel = context.registry.getChannelOrMain(Model.CHANNEL_QUEUE);
  		int maxTask = context.taskManager.calcChannelBufferFree(channel);
  		maxTask = Math.min(maxTask, 50);
  		Map<String, Integer> channelSizes = new HashMap<String, Integer>();
  		channelSizes.put(Model.CHANNEL_QUEUE, maxTask);
  		List<TaskRec> heads = tedDao.reserveTaskPortion(channelSizes);
  		if (heads.isEmpty())
  			return;
  
  		for (final TaskRec head : heads) {
  			logger.debug("exec eventQueue for '{}', headTaskId={}", head.key1, head.taskId);
  			channel.workers.execute(new TedRunnable(head) {
  				@Override
  				public void run() {
  					processEventQueue(head);
  				}
  			});
  		}
  	}
docs: heads uniqueness by key1 should be guaranteed by unique index.