code: public MessageId send(ProducerConnectionContext context, BasicMessage basicMessage, Map<String, String> headers)
              throws JMSException {
          if (context == null) {
              throw new IllegalArgumentException("context must not be null");
          }
          if (basicMessage == null) {
              throw new IllegalArgumentException("message must not be null");
          }
  
          // create the JMS message to be sent
          Message msg = createMessage(context, basicMessage, headers);
  
          // if the message is correlated with another, put the correlation ID in the Message to be sent
          if (basicMessage.getCorrelationId() != null) {
              msg.setJMSCorrelationID(basicMessage.getCorrelationId().toString());
          }
  
          if (basicMessage.getMessageId() != null) {
              log.debugf("Non-null message ID [%s] will be ignored and a new one generated",
                      basicMessage.getMessageId());
              basicMessage.setMessageId(null);
          }
  
          // now send the message to the broker
          MessageProducer producer = context.getMessageProducer();
          if (producer == null) {
              throw new IllegalStateException("context had a null producer");
          }
  
          producer.send(msg);
  
          // put message ID into the message in case the caller wants to correlate it with another record
          MessageId messageId = new MessageId(msg.getJMSMessageID());
          basicMessage.setMessageId(messageId);
  
          return messageId;
      }
docs: Send the given message to its destinations across the message bus. Once sent, the message will get assigned a
  generated message ID. That message ID will also be returned by this method.
  
  Since this is fire-and-forget - no response is expected of the remote endpoint.
  
  @param context information that determines where the message is sent
  @param basicMessage the message to send with optional headers included
  @param headers headers for the JMS transport that will override same-named headers in the basic message
  @return the message ID
  @throws JMSException any error
  
  @see ConnectionContextFactory#createProducerConnectionContext(Endpoint)