code: @TransactionAttribute(TransactionAttributeType.REQUIRED)
      public void submit(PushApplication pushApplication, InternalUnifiedPushMessage message) {
          logger.debug("Processing send request with '{}' payload", message.getMessage());
  
          // collections for all the different variants:
          final VariantMap variants = new VariantMap();
  
          final List<String> variantIDs = message.getCriteria().getVariants();
  
          // if the criteria payload did specify the "variants" field,
          // we look up each of those mentioned variants, by their "variantID":
          if (variantIDs != null) {
  
              variantIDs.forEach(variantID -> {
                  Variant variant = genericVariantService.get().findByVariantID(variantID);
  
                  // does the variant exist ?
                  if (variant != null) {
                      variants.add(variant);
                  }
              });
          } else {
              // No specific variants have been requested,
              // we get all the variants, from the given PushApplicationEntity:
              variants.addAll(pushApplication.getVariants());
          }
  
          // TODO: Not sure the transformation should be done here...
          // There are likely better places to check if the metadata is way to long
          String jsonMessageContent = message.toStrippedJsonString() ;
          if (jsonMessageContent != null && jsonMessageContent.length() >= 4500) {
              jsonMessageContent = message.toMinimizedJsonString();
          }
  
          final FlatPushMessageInformation pushMessageInformation =
                  metricsService.storeNewRequestFrom(
                          pushApplication.getPushApplicationID(),
                          jsonMessageContent,
                          message.getIpAddress(),
                          message.getClientIdentifier()
                  );
  
          // we split the variants per type since each type may have its own configuration (e.g. batch size)
          variants.forEach((variantType, variant) -> {
              logger.info(String.format("Internal dispatching of push message for one %s variant (by %s)", variantType.getTypeName(), message.getClientIdentifier()));
              dispatchVariantMessageEvent.fire(new MessageHolderWithVariants(pushMessageInformation, message, variantType, variant));
          });
      }
docs: Receives a request for sending a {@link UnifiedPushMessage} and queues one message per variant type, both in one transaction.
  
  Once this method returns, message is recorded and will be eventually delivered in the future.
  
  @param pushApplication the push application
  @param message the message