code: @Override
      public CloudTrailSource getSource(Message sqsMessage) throws IOException {
          ExceptionChain exceptionChain = new ExceptionChain();
  
          if (lastUsedSourceSerializer != null) {
              CloudTrailSource source = getCloudTrailSource(sqsMessage, lastUsedSourceSerializer, exceptionChain);
              if (source != null) {
                  return source;
              }
          }
  
          for (SourceSerializer serializer: sourceSerializers) {
              // already tried lastUsedSourceSerializer, so skip it and move on
              if (serializer == lastUsedSourceSerializer) {
                  continue;
              }
              CloudTrailSource source = getCloudTrailSource(sqsMessage, serializer, exceptionChain);
              if (source != null) {
                  lastUsedSourceSerializer = serializer;
                  return source;
              }
          }
  
          throw exceptionChain.throwOut();
      }
docs: {@inheritDoc}