This signals that there are new messages available in a queue.
338740
def NotifyQueue(self, notification, **kwargs):
    """"""
    self._MultiNotifyQueue(notification.session_id.Queue(), [notification],
                           **kwargs)
1269470
def indicator(self):
        """"""

        while self.run:
            try:
                size = self.work_q.qsize()
            except Exception:
                note = 'Please wait '
            else:
                note = 'Number of Jobs in Queue = %s ' % size

            if self.msg:
                note = '%s %s' % (note, self.msg)

            for item in ['|', '/', '-', '\\']:
                sys.stdout.write('\rProcessing - [ %s ] - %s ' % (item, note))
                sys.stdout.flush()
                time.sleep(.1)
                self.run = self.run
368492
public synchronized List<LocalQueue> updatedQueues( List<String> deliveredMessageIDs ) throws FFMQException
    {
    	int len = deliveredMessageIDs.size();
    	List<LocalQueue> updatedQueues = new ArrayList<>(len);
    	for(int n=0;n<len;n++)
    	{
    		String deliveredMessageID = deliveredMessageIDs.get(len-n-1);
    		
    		boolean found = false;
    		Iterator<TransactionItem> entries = items.iterator();
        	while (entries.hasNext())
    		{
        		TransactionItem item = entries.next();
        		if (item.getMessageId().equals(deliveredMessageID))
        		{
        			found = true;
        			
        			LocalQueue localQueue = item.getDestination();
                    if (!updatedQueues.contains(localQueue))
                        updatedQueues.add(localQueue);

        			break;
        		}
    		}
    		
    		if (!found)
    			throw new FFMQException("Message does not belong to transaction : "+deliveredMessageID,"INTERNAL_ERROR");
    	}
    	return updatedQueues;
    }
478368
@Override
    public void notifyMessageReceived(SQSMessage message) throws JMSException {
        SQSMessageIdentifier messageIdentifier = SQSMessageIdentifier.fromSQSMessage(message);
        if (!unAckMessages.contains(messageIdentifier)) {
            unAckMessages.add(messageIdentifier);
        }
    }
352646
def check_for_new(self):
        """"""
        free_slots = self.max_processes - len(self.processes)
        for item in range(free_slots):
            key = self.queue.next()
            if key is not None:
                self.spawn_new(key)
62684
private void showNextSuperToast() {
        // Do nothing if the queue is empty
        if (superToastPriorityQueue.isEmpty()) return;

        // Get next SuperToast in the queue
        final SuperToast superToast = superToastPriorityQueue.peek();
        if (!superToast.isShowing()) {
            final Message message = obtainMessage(Messages.DISPLAY_SUPERTOAST);
            message.obj = superToast;
            sendMessage(message);
        }
    }
1153550
protected function ack()
    {
        $this->queue->ack($this->lastDeliveryTag, Constants::AMQP_MULTIPLE);
        $this->lastDeliveryTag = null;
        $delta = $this->timestampLastMessage - $this->timestampLastAck;

        $this->logger->info(sprintf(
            'Acknowledged %d messages at %.0f msg/s',
            $this->countMessagesUnacked,
            $delta ? $this->countMessagesUnacked / $delta : 0
        ));

        $this->timestampLastAck = microtime(true);
        $this->countMessagesUnacked = 0;
    }
413396
def notify(self, msg, color='green', notify='true', message_format='text'):
        """"""
        self.message_dict = {
            'message': msg,
            'color': color,
            'notify': notify,
            'message_format': message_format,
        }
        if not self.debug:
            return requests.post(
                self.notification_url,
                json.dumps(self.message_dict),
                headers=self.headers
            )
        else:
            print('HipChat message: <{}>'.format(msg))
            return []
849219
def queue(self):
        
        queue = NotificationQueue()
        self._listeners.add(queue)
        yield queue
        self._listeners.remove(queue)
1238699
private void notifyGet_() {
        // a notification may be lost in some cases - however
        // as none of the threads wait endlessly, a waiting thread
        // will either be notified, or will eventually wakeup
        int lastWaitIndex = getQueueIndex(getQueueLocks_, getQueueCounter_, false);
        int lockIndex = lastWaitIndex;
        for (int i = 0; i < getQueueLocks_.length; i++) {

            // are threads waiting on this queue?
            if (getQueueLocks_[lockIndex].threadsWaiting > 0) {
                synchronized (getQueueLocks_[lockIndex]) {
                    // make sure we are actually notifying somebody
                    // now that the lock is held
                    if (getQueueLocks_[lockIndex].threadsWaiting > 0) {
                        getQueueLocks_[lockIndex].notify();
                        return;
                    } else {
                        // somebody stole my notify, make up for it
                        // by allowing another attempt
                        i--;
                    }
                }
            }

            // check to see whether a new thread has waited
            int checkIndex = getQueueIndex(getQueueLocks_, getQueueCounter_, false);
            if (checkIndex != lastWaitIndex) {
                // restart scan from the new wait index
                lockIndex = checkIndex;
                lastWaitIndex = lockIndex;
                i = 0;
            } else {
                // increment to next element
                lockIndex = ++lockIndex % getQueueLocks_.length;
            }
        }

        // D638088 - if we get here, the entire lock array was scanned and
        // nobody was found to notify.
    }
476956
def pre_notify(msg)

      @services.select { |n, s|
        s.respond_to?(:on_pre_msg)
      }.sort_by { |n, s|
        n
      }.each { |n, s|
        s.on_pre_msg(msg)
      }
    end
1025330
void notifyOmemoMucMessageReceived(MultiUserChat muc,
                                       Stanza stanza,
                                       OmemoMessage.Received decryptedMessage) {
        for (OmemoMucMessageListener l : omemoMucMessageListeners) {
            l.onOmemoMucMessageReceived(muc, stanza, decryptedMessage);
        }
    }
1046509
def notification_message(cls, item):
        ''''''
        assert isinstance(item, Notification)
        return cls.encode_payload(cls.request_payload(item, None))
156660
def notify_block_new(self, block):
        """"""
        payload = block.SerializeToString()
        self._notify(
            "consensus_notifier_notify_block_new", payload, len(payload))
623183
private void acknowledgeQueueMessage(String messageId) {
        try {
            _queueService.acknowledge(_queueName, ImmutableList.of(messageId));
        } catch (Exception e) {
            _log.error("Failed to acknowledge message: [messageId={}]", messageId, e);
        }
    }
1346077
@SuppressWarnings("unchecked")
    public static UniversalIdStrQueueMessage newInstance() {
        Date now = new Date();
        UniversalIdStrQueueMessage msg = new UniversalIdStrQueueMessage();
        msg.setQueueTimestamp(now).setNumRequeues(0)
                .setId(QueueUtils.IDGEN.generateId128Hex().toLowerCase()).setTimestamp(now);
        return msg;
    }
500245
private void receiveMessage() {
		MessagingSystemInfo messagingSystemInfo = oneAgentSdk.createMessagingSystemInfo("DynatraceSample", "theQueue", MessageDestinationType.QUEUE, ChannelType.IN_PROCESS, null);
		IncomingMessageReceiveTracer incomingMessageReceiveTracer = oneAgentSdk.traceIncomingMessageReceive(messagingSystemInfo);
		incomingMessageReceiveTracer.start();
		try {
			Message msg = queueManager.receive("theQeue");
			if (msg == null) {
				return; // no message received
			}
			IncomingMessageProcessTracer incomingMessageProcessTracer = oneAgentSdk.traceIncomingMessageProcess(messagingSystemInfo);
			// store incoming tag to tracer:
			incomingMessageProcessTracer.setDynatraceStringTag(msg.getProperty(OneAgentSDK.DYNATRACE_MESSAGE_PROPERTYNAME));
			incomingMessageProcessTracer.setVendorMessageId(msg.getVendorMessageId());
						incomingMessageProcessTracer.start();
			try {
				// do something with the message ...
				System.out.println("Message received: " + msg.toString());
			} catch (Exception e) {
				incomingMessageProcessTracer.error(e);
			} finally {
				incomingMessageProcessTracer.end();
			}
			
			
		} catch (Exception e) {
			incomingMessageReceiveTracer.error(e);
		} finally {
			incomingMessageReceiveTracer.end();
		}
	}