public void publish(AWSIotMessage message) throws AWSIotException {
  try {
    publishMessage(message);
  }
 catch (  AwsIotRetryableException e) {
    if (client.getMaxOfflineQueueSize() > 0 && publishQueue.size() < client.getMaxOfflineQueueSize()) {
      publishQueue.add(message);
    }
 else {
      LOGGER.info("Failed to publish message to " + message.getTopic());
      throw new AWSIotException(e);
    }
  }
}

public void publish ( AWSIotMessage message ) throws AWSIotException { try { publishMessage ( message ) ; } catch ( AwsIotRetryableException e ) { if ( client . getMaxOfflineQueueSize ( ) > 0 && publishQueue . size ( ) < client . getMaxOfflineQueueSize ( ) ) { publishQueue . add ( message ) ; } else { LOGGER . info ( "Failed to publish message to " + message . getTopic ( ) ) ; throw new AWSIotException ( e ) ; } } }
the actual publish method exposed by this class .
