code: public DelayableImmutableMessage poll(long timeout, TimeUnit unit) throws InterruptedException {
          DelayableImmutableMessage message = delayableImmutableMessages.poll(timeout, unit);
          if (message != null) {
              messagePersister.remove(messageQueueId, message);
          }
          return message;
      }
docs: Polls the message queue for a period no longer than the timeout specified for a new message.
  
  If a message is successfully obtained, before returning it, a message persister is called in order to remove
  this message from the persistence (in case it was persisted at all).
  
  @param timeout the maximum time to wait for a message to become available.
  @param unit the time unit of measurement for <code>timeout</code>
  @return a new message if one is available, or <code>null</code> if none became available within the specified time limit.
  @throws InterruptedException if the thread was interrupted while waiting for a message to become available.