This method is internal method which would send message to ME on top
of producer session. This is called from Sync send and Async Send. In case of Sync send
it would have guarded with monitor sessionSyncLock.

@param msg
495660
private void sendUsingProducerSession(Message message) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "sendUsingProducerSession", new Object[] { message });

        checkClosed();
        // check for sync/async conflicts
        session.checkSynchronousUsage("send");
        // if the supplied message is null, throw a jms MessageFormatException.
        if (message == null) {
            throw (MessageFormatException) JmsErrorUtils.newThrowable(
                                                                      MessageFormatException.class,
                                                                      "INVALID_VALUE_CWSIA0068",
                                                                      new Object[] { "message", null },
                                                                      tc);
        }
        if (propsOverriden) {
            // This block will be invoked if the user is flipping back and forth
            // between the multi-arg identified send, and this 1-arg send. In this
            // case we need to re-instate the dm, pri, ttl values from the producer.
            producerProperties.setInDeliveryMode(defaultDeliveryMode);
            producerProperties.setInPriority(defaultPriority);
            producerProperties.setInTTL(defaultTimeToLive);

            // Mark that we are back with the defaults so we don't do this set the
            // next time around.
            propsOverriden = false;
        }

        // Delegate to the internal send method.
        sendMessage(producerProperties, message, dest);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "sendUsingProducerSession");

    }
222213
public void onMessage(Message msg) {
	        try {
                    LOG.debug("Queuing msg [" + msg.getJMSMessageID() + "]");
                } catch (JMSException e) {
                }
		this.queue.offer(msg);
	}
735195
private synchronized boolean msgCanBeSent( long stamp, boolean nackMsg )
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(this, tc, "msgCanBeSent", new Object[] { Long.valueOf(stamp),
          Boolean.valueOf(nackMsg),
          Long.valueOf(firstMsgOutsideWindow),
          Boolean.valueOf(containsGuesses)});

    boolean sendMessage = true;
    
    // Check whether we can send the message
    // Don't send any messages once there is a guess in the stream (unless a NACK)
    if ((stamp >= firstMsgOutsideWindow) || (containsGuesses && !nackMsg))
    {
      sendMessage = false;
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
      {
        SibTr.debug(tc, "firstMsgOutsideWindow is: " + firstMsgOutsideWindow
        + " sendWindow is " +  sendWindow + " containsGuesses is " + containsGuesses);
      }
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "msgCanBeSent", Boolean.valueOf(sendMessage));

    return sendMessage;
  }
198053
protected void sendDatagram (UpstreamMessage msg)
        throws IOException
    {
        // reset the stream and write our connection id and hash placeholder
        _bout.reset();
        _uout.writeInt(_client.getConnectionId());
        _uout.writeLong(0L);

        // write the datagram through the sequencer
        _sequencer.writeDatagram(msg);

        // flip the buffer and make sure it's not too long
        ByteBuffer buf = _bout.flip();
        int size = buf.remaining();
        if (size > Client.MAX_DATAGRAM_SIZE) {
            log.warning("Dropping oversized datagram", "size", size, "msg", msg);
            return;
        }

        // compute the hash
        buf.position(12);
        _digest.update(buf);
        byte[] hash = _digest.digest(_secret);

        // insert the first 64 bits of the hash
        buf.position(4);
        buf.put(hash, 0, 8).rewind();

        // send the datagram
        writeDatagram(buf);

        // notify the tracker
        _client.getMessageTracker().messageSent(true, size, msg);
    }
264923
public void sendMessage(String message) {
		try {
			getChat().sendMessage(message);
		} catch (XMPPException | NotConnectedException e) {
			e.printStackTrace();
		}
	}
1345055
public function serverStopProcess($msg = null)
  {
    Signal::getInstance()->emit("notifyServershutdown", $this);

    $this->execute("serverprocessstop", array("reasonmsg" => $msg));
  }
506037
public void sendSilenceMessage(
     long startStamp,
     long endStamp,
     long completedPrefix,
     boolean requestedOnly,
     int priority,
     Reliability reliability,
     SIBUuid12 stream)
     throws SIResourceException
   {

     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
       SibTr.entry(tc, "sendSilenceMessage",
         new Object[] {
           new Long(startStamp),
           new Long(endStamp),
           new Long(completedPrefix),
           new Integer(priority),
           reliability });

     ControlSilence sMsg;
     try
     {
       // Create new Silence message
       sMsg = _cmf.createNewControlSilence();
     }
     catch (Exception e)
     {
       // FFDC
       FFDCFilter.processException(
         e,
         "com.ibm.ws.sib.processor.impl.PubSubOutputHandler.sendSilenceMessage",
         "1:787:1.164.1.5",
         this);

       SibTr.exception(tc, e);
       SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
         new Object[] {
           "com.ibm.ws.sib.processor.impl.PubSubOutputHandler",
           "1:794:1.164.1.5",
           e });

       if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
         SibTr.exit(tc, "sendSilenceMessage", e);

       throw new SIResourceException(
         nls.getFormattedMessage(
          "INTERNAL_MESSAGING_ERROR_CWSIP0002",
          new Object[] {
            "com.ibm.ws.sib.processor.impl.PubSubOutputHandler",
            "1:805:1.164.1.5",
            e },
          null),
         e);
     }

     // As we are using the Guaranteed Header - set all the attributes as 
     // well as the ones we want.
     SIMPUtils.setGuaranteedDeliveryProperties(sMsg,
         _messageProcessor.getMessagingEngineUuid(), 
         null,
         stream,
         null,
         _destinationHandler.getUuid(),
         ProtocolType.PUBSUBINPUT,
         GDConfig.PROTOCOL_VERSION);
    
     sMsg.setStartTick(startStamp);
     sMsg.setEndTick(endStamp);
     sMsg.setPriority(priority);
     sMsg.setReliability(reliability);
     sMsg.setCompletedPrefix(completedPrefix);
     sMsg.setRequestedOnly(requestedOnly);
     
     // If the destination in a Link add Link specific properties to message
     if( _isLink )
     {
       sMsg = (ControlSilence)addLinkProps(sMsg);
     }
    
     // Send message to destination
     // Using MPIO

     // Send the message to the MessageTransmitter
     //add a target cellule to the array for sending
     SIBUuid8[] fromTo = new SIBUuid8[1];
     fromTo[0] = _targetMEUuid;
      
     // Send at priority+1 if this is a response to a Nack
     if( requestedOnly )
       _mpio.sendDownTree(fromTo, priority+1, sMsg);
     else
       _mpio.sendDownTree(fromTo, priority, sMsg);

     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
       SibTr.exit(tc, "sendSilenceMessage");

   }
1148456
public function sendMessage(Message $msg)
    {
        if (is_callable($this->sendMessageFunction)) {
            call_user_func_array($this->sendMessageFunction, [$msg]);
        }
    }
949189
def _publish(self, msg):
        
        connection = self._connection.clone()
        publish = connection.ensure(self.producer, self.producer.publish,
                                    errback=self.__error_callback,
                                    max_retries=MQ_PRODUCER_MAX_RETRIES)
        publish(json.dumps(msg), exchange=self._exchange,
                routing_key=self._routing_key, declare=[self._queue])
        logging.debug('Publisher: message sent: %s', msg)
127195
public <T extends BasicMessage> RPCConnectionContext sendAndListen(ProducerConnectionContext context,
            BasicMessage basicMessage, BasicMessageListener<T> responseListener) throws JMSException {
        return sendAndListen(context, basicMessage, responseListener, null);
    }
1178840
public void sendBasicMessageAsync(Session session, BasicMessage msg) {
        String text = ApiDeserializer.toHawkularFormat(msg);
        sendTextAsync(session, text);
    }
201183
private void runMessage(MessageAmp msg)
  {
    try (OutboxAmp outbox = OutboxAmpFactory.newFactory().get()) {
      outbox.inbox(msg.inboxTarget());
      outbox.message(msg);
      
      //RampActor systemActor = null;
      StubAmp systemActor = _stub;
      
      msg.invoke(InboxExecutorBase.this, systemActor);
      
      while (! outbox.flushAndExecuteLast()) {
      }
    }
  }
833929
public void pushMessages(List<Pair<K, V>> messages) {
    for (Pair<K, V> message: messages) {
      this.producer.send(new ProducerRecord<>(topic, message.getKey(), message.getValue()), (recordMetadata, e) -> {
        if (e != null) {
          log.error("Failed to send message to topic {} due to exception: ", topic, e);
        }
      });
    }
  }
892469
protected void queueSendToWebsocketNB(String msg) {
        if (this.sendProcess.getPendingStepCount() < MAX_MSG_BACKLOG) {
            MySendStep sendStep = new MySendStep(msg);
            this.sendProcess.addStep(sendStep);
        } else {
            log.info("websocket backlog is full; aborting connection: sessionId={}", this.socketSessionId);

            this.safeClose();
        }
    }
282640
public void sendMessage(String requestMessage, String queueName, String correlationId,
            final Queue replyQueue, int delaySeconds, int deliveryMode) throws JMSException {
        /**
         * If it's an internal message then always use jmsTemplate for ActiveMQ
         */

        if (jmsTemplate != null) {
            jmsTemplate.setDeliveryMode(deliveryMode);
            if (!StringUtils.isEmpty(queueName)) {
                jmsTemplate.send(queueName, new MDWMessageCreator(requestMessage, correlationId,
                        replyQueue, delaySeconds));

            }
            else {
                jmsTemplate.send(new MDWMessageCreator(requestMessage, correlationId, replyQueue));
            }
        }
    }
161320
public void send(final Message msg) throws MailException {
		Transport transport = null;
		try {
			if (log.isDebugEnabled()) {
				log.debug("Sending mail message [subject={}, recipients={}]", msg.getSubject(),
						on(", ").join(msg.getAllRecipients()));
			}
			transport = sessionProvider.get().getTransport();
			transport.connect();
			transport.sendMessage(msg, msg.getAllRecipients());
		} catch (MessagingException ex) {
			throw new MailException("Error sending mail message", ex);
		} finally {
			try {
				transport.close();
			} catch (MessagingException ex) {
				log.error(ex.getMessage(), ex);
			}
		}
	}
182275
@OnMessage
	public void onMessage(Dto msg, Session session) {
		try {
			messageBus.fire(session);
			messagePayloadBus.fire(msg);
		} catch (Exception e) {

			log.log(Level.SEVERE, e.getMessage(), e);
		}

	}