@Override
  public Map<SystemStreamPartition, List<IncomingMessageEnvelope>> poll(
      Set<SystemStreamPartition> systemStreamPartitions, long timeout) throws InterruptedException {

    // check if the proxy is running
    if (!proxy.isRunning()) {
      LOG.info("{}: KafkaConsumerProxy is not running. Stopping the consumer.", this);
      stop();
      String message = String.format("%s: KafkaConsumerProxy has stopped.", this);
      throw new SamzaException(message, proxy.getFailureCause());
    }

    return super.poll(systemStreamPartitions, timeout);
  }
Compare two String offsets.
Note. There is a method in KafkaSystemAdmin that does that, but that would require instantiation of systemadmin for each consumer.
@return see {@link Long#compareTo(Long)}
samza-kafka/src/main/java/org/apache/samza/system/kafka/KafkaSystemConsumer.java