Adds the reply-to queue name and url attributes during send as part of the send message
request, if necessary
353719
private void addReplyToQueueReservedAttributes(Map<String, MessageAttributeValue> messageAttributes,
                                                   SQSMessage message) throws JMSException {

        Destination replyTo = message.getJMSReplyTo();
        if (replyTo instanceof SQSQueueDestination) {
            SQSQueueDestination replyToQueue = (SQSQueueDestination)replyTo;
    
            /**
             * This will override the existing attributes if exists. Everything that
             * has prefix JMS_ is reserved for JMS Provider, but if the user sets that
             * attribute, it will be overwritten.
             */
            addStringAttribute(messageAttributes, SQSMessage.JMS_SQS_REPLY_TO_QUEUE_NAME, replyToQueue.getQueueName());
            addStringAttribute(messageAttributes, SQSMessage.JMS_SQS_REPLY_TO_QUEUE_URL, replyToQueue.getQueueUrl());
        }
    }
90315
def SendReply(self,
                rdf_value=None,
                session_id=None,
                message_type=rdf_flows.GrrMessage.Type.MESSAGE):
    """"""
    # TODO(hanuszczak): This is pretty bad. Here we assume that if the session
    # id is not none we are "replying" to a well-known flow. If we are replying
    # to a well-known flow we cannot increment the response id (since these are
    # not really responses) because otherwise the parent flow will think it is
    # missing some responses.
    #
    # Moreover, the message queue (at least in the flow test helper workflow)
    # expects flow messages to have request id equal to 0. This is rather
    # convoluted and should be untangled in the future.
    #
    # Once we have a separate method for communicating with well-known flows
    # this if-statement should no longer be relevant (since setting custom
    # session ids would become illegal).
    if session_id is None:
      response_id = self.response_id
      request_id = self.message.request_id
      session_id = self.message.session_id
      self.response_id += 1
    else:
      response_id = 0
      request_id = 0

    self.grr_worker.SendReply(
        rdf_value,
        # This is not strictly necessary but adds context
        # to this response.
        name=self.__class__.__name__,
        session_id=session_id,
        response_id=response_id,
        request_id=request_id,
        message_type=message_type,
        task_id=self.message.Get("task_id") or None,
        require_fastpoll=self.require_fastpoll)
318623
function ( name, data, response ) {
		log('ws', 'send', name, data);
		// store link to talk back when ready
		pool[name].response = response;
		// actual post
		pool[name].socket.send(data);
		pool[name].count++;
	}
185244
def send(self, request, pk=None):
        
        schedule = self.get_object()
        queue_subscription_send.delay(str(schedule.id))

        return Response({}, status=status.HTTP_202_ACCEPTED)
1249753
def _update_message_request(self, message):
        
        for each in self.row_keys:
            message.rows.row_keys.append(_to_bytes(each))

        for each in self.row_ranges:
            r_kwrags = each.get_range_kwargs()
            message.rows.row_ranges.add(**r_kwrags)
469892
def add_message(self, id, body, tags=False):
        
        if not tags:
            tags = {}
        try:
            self._tx_queue_lock.acquire()
            self._tx_queue.append(
                EventHub_pb2.Message(id=id, body=body, tags=tags, zone_id=self.eventhub_client.zone_id))
        finally:
            self._tx_queue_lock.release()
        return self
169441
def send_jsonified(self, msg, stats=True):
        
        msg = bytes_to_str(msg)

        if self._immediate_flush:
            if self.handler and self.handler.active and not self.send_queue:
                # Send message right away
                self.handler.send_pack('a[%s]' % msg)
            else:
                if self.send_queue:
                    self.send_queue += ','
                self.send_queue += msg

                self.flush()
        else:
            if self.send_queue:
                self.send_queue += ','
            self.send_queue += msg

            if not self._pending_flush:
                self.server.io_loop.add_callback(self.flush)
                self._pending_flush = True

        if stats:
            self.stats.on_pack_sent(1)
265140
public void sendTextMessage(String queueName, String message, int delaySeconds)
            throws NamingException, JMSException, ServiceLocatorException {
        sendTextMessage(null, queueName, message, delaySeconds, null);
    }
1351552
async def AddCharm(self, channel, url):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Client',
                   request='AddCharm',
                   version=1,
                   params=_params)
        _params['channel'] = channel
        _params['url'] = url
        reply = await self.rpc(msg)
        return reply
868359
function queueOrRequest( el ){
			var url = el.data( "url" );
			if( o.proxy && $.inArray( url, urllist ) === -1 ){
				urllist.push( url );
				elQueue = elQueue.add( el );
			}
			else{
				AI.makeReq( url, el );
			}
		}
1187844
public void send(String queueName, Command command, int deliveryMode) {
        send(queueName, command, deliveryMode, 4, 0);
    }
718299
def receive_message(queue_url: nil, max_number_of_messages: nil)
      queue = queue_by_url queue_url
      r = MockResponse.new
      r.messages = Array(queue.messages.shift max_number_of_messages) if queue.messages.any?
      r
    end
1075227
def req(self, message_id, timeout):
        ''''''
        return self.send(constants.REQ + ' ' + message_id + ' ' + str(timeout))
1321983
def _push_async_request(self, msg_id, request, reply_cb, inform_cb,
                            user_data, timeout_handle):
        """"""
        assert get_thread_ident() == self.ioloop_thread_id
        self._async_queue[msg_id] = (
            request, reply_cb, inform_cb, user_data, timeout_handle)
        if request.name in self._async_id_stack:
            self._async_id_stack[request.name].append(msg_id)
        else:
            self._async_id_stack[request.name] = [msg_id]
344916
def add_message(request, level, message, extra_tags='', fail_silently=False):
    """"""
    if not horizon_message_already_queued(request, message):
        if request.is_ajax():
            tag = constants.DEFAULT_TAGS[level]
            # if message is marked as safe, pass "safe" tag as extra_tags so
            # that client can skip HTML escape for the message when rendering
            if isinstance(message, SafeData):
                extra_tags = extra_tags + ' safe'
            request.horizon['async_messages'].append([tag,
                                                      force_text(message),
                                                      extra_tags])
        else:
            return _messages.add_message(request, level, message,
                                         extra_tags, fail_silently)
1042436
def reply(self, text, markup=None, parse_mode=None):
        
        if markup is None:
            markup = {}

        return self.send_text(
            text,
            reply_to_message_id=self.message["message_id"],
            disable_web_page_preview="true",
            reply_markup=self.bot.json_serialize(markup),
            parse_mode=parse_mode,
        )
556061
public void addExtendedTraceDetail(SIBusMessage message)
  {
    if (message == null)
    {
      validateAndPutProperty("MessageTTL", "");
      validateAndPutProperty("RemainingTTL", "");
      validateAndPutProperty("FRP", "");
      validateAndPutProperty("RRP", "");
      validateAndPutProperty("ReplyDiscriminator", "");
      validateAndPutProperty("ReplyPriority", "");
      validateAndPutProperty("ReplyReliability", "");
      validateAndPutProperty("ReplyTTL", "");
    }
    else
    {
      validateAndPutProperty("MessageTTL", message.getTimeToLive());
      validateAndPutProperty("RemainingTTL", new Long(message.getRemainingTimeToLive()));
      validateAndPutProperty("FRP", message.getForwardRoutingPath());
      validateAndPutProperty("RRP", message.getReverseRoutingPath());
      validateAndPutProperty("ReplyDiscriminator", message.getReplyDiscriminator());
      validateAndPutProperty("ReplyPriority", message.getReplyPriority());
      validateAndPutProperty("ReplyReliability", message.getReplyReliability());
      validateAndPutProperty("ReplyTTL", message.getReplyTimeToLive());
    }
  }