try {
List<Message<Long>> results;
long from = set.getUidFrom();
final long to = set.getUidTo();
final int batchSize = set.getBatchSize();
final Type type = set.getType();
// when batch is specified fetch data in chunks and send back in
// batches
do {
switch (type) {