code: @Override
      public void publish(List<Message> messages, DeliveryOptions deliveryOptions) throws IOException {
          for (int attempt = 1; attempt <= DEFAULT_RETRY_ATTEMPTS; attempt++) {
              if (attempt > 1) {
                  LOGGER.info("Attempt {} to send messages within transaction", attempt);
              }
  
              try {
                  Channel channel = provideChannel();
                  try {
                      for (Message message : messages) {
                          message.publish(channel, deliveryOptions);
                      }
                      commitTransaction(channel);
                  } catch (IOException e) {
                      rollbackTransaction(channel);
                      throw e;
                  }
                  return;
              } catch (IOException e) {
                  handleIoException(attempt, e);
              }
          }
      }
docs: {@inheritDoc}