code: private int doPublish(boolean isControl, String deviceId, String topic, KuraPayload kuraPayload, int qos, boolean retain, int priority) throws KuraException {
          String target = target(applicationId + ":" + topic);
          int kuraMessageId = Math.abs(new Random().nextInt());
  
          Map<String, Object> headers = new HashMap<>();
          headers.put(CAMEL_KURA_CLOUD_CONTROL, isControl);
          headers.put(CAMEL_KURA_CLOUD_MESSAGEID, kuraMessageId);
          headers.put(CAMEL_KURA_CLOUD_DEVICEID, deviceId);
          headers.put(CAMEL_KURA_CLOUD_QOS, qos);
          headers.put(CAMEL_KURA_CLOUD_RETAIN, retain);
          headers.put(CAMEL_KURA_CLOUD_PRIORITY, priority);
  
          producerTemplate.sendBodyAndHeaders(target, kuraPayload, headers);
          return kuraMessageId;
      }
docs: Helpers