code: protected void doPublish(String tenantId, List<T> items, String subscriber,
              int retryCount, long delay) throws Exception {
          String data = mapper.writeValueAsString(items);
  
          TextMessage tm = session.createTextMessage(data);
  
          if (tenantId != null) {
              tm.setStringProperty("tenant", tenantId);
          }
  
          if (subscriber != null) {
              tm.setStringProperty("subscriber", subscriber);
          }
  
          tm.setIntProperty("retryCount", retryCount);
  
          if (delay > 0) {
              tm.setLongProperty("_AMQ_SCHED_DELIVERY", System.currentTimeMillis() + delay);
          }
  
          if (log.isLoggable(Level.FINEST)) {
              log.finest("Publish: " + tm);
          }
  
          producer.send(tm);
      }
docs: This method publishes the supplied items.
  
  @param tenantId The tenant id
  @param items The items
  @param subscriber The optional subscriber name
  @param retryCount The retry count
  @param delay The delay
  @throws Exception Failed to publish