This tries to process the notification again
331211
public function executeAction()
    {
        // get event queue id
        $eventQueueId = $this->getRequest()->getParam('event_queue_id');
        $this->_executeEventQueue($eventQueueId);

        // return back to the view
        $this->_redirect('*/*/');
    }
543222
function Notification (payload) {
  this.encoding = "utf8";
  this.payload = {};
  this.compiled = false;

  this.aps = {};
  this.expiry = 0;
  this.priority = 10;

  if (payload) {
    for(let key in payload) {
      if (payload.hasOwnProperty(key)) {
        this[key] = payload[key];
      }
    }
  }
}
452648
@Override
    public void handleNotification(Notification notification, Object handback) {
        String notificationType = notification.getType();
        if (notificationType.equals(JMXConnectionNotification.OPENED)) {
            managementContext.incrementManagementSessionCount();
        } else if (notificationType.equals(JMXConnectionNotification.CLOSED)) {
            managementContext.decrementManagementSessionCount();
        }
    }
564646
public synchronized void resumeReceives() {
        receivesSuspended = false;if(Thread.currentThread() == channel.getIoThread()) {
            doResume();
        } else {
            channel.getIoThread().execute(new Runnable() {
                @Override
                public void run() {
                    doResume();
                }
            });
        }
    }
661110
public void onNotificationsResumed() {
        isNotificationsPaused = false;

        // If there are notifications during pause
        if (notificationsDuringPause.size() > 0) {

            if (isAppVisible) {
                if (visiblePeer != null && notificationsDuringPause.containsKey(visiblePeer)) {

                    // If there was message from visible chat
                    if (isMobilePlatform) {

                        // Playing sound effects for mobile platforms
                        playEffectIfEnabled();
                    } else {

                        // Don't play sounds in chat on non-mobile platforms
                    }
                } else {

                    // If there are no messages from visible peer
                    if (isMobilePlatform) {

                        // Don't play sounds not from current chat on mobile platforms
                    } else {

                        // Find any suitable peer and if found play sound effect
                        for (Peer p : notificationsDuringPause.keySet()) {

                            if (isNotificationsEnabled(p, notificationsDuringPause.get(p))) {
                                playEffectIfEnabled();
                                break; // Can't do return because we need to make more work later
                            }
                        }
                    }
                }
            } else {

                // Just show out-app notification
                for (Peer p : notificationsDuringPause.keySet()) {

                    if (isNotificationsEnabled(p, notificationsDuringPause.get(p))) {
                        showNotification();
                        break;
                    }
                }
            }

            // Clearing of notifications
            notificationsDuringPause.clear();
        }
    }
49022
def requeue(self):
        
        if self.acknowledged:
            raise self.MessageStateError(
                "Message already acknowledged with state: %s" % self._state)
        self.backend.requeue(self.delivery_tag)
        self._state = "REQUEUED"
1358103
@Override
	public void onFinishSending(PayloadSender sender, PayloadData payload, boolean cancelled, String errorMessage, int responseCode, JSONObject responseData) {
		ApptentiveNotificationCenter.defaultCenter()
			.postNotification(NOTIFICATION_PAYLOAD_DID_FINISH_SEND,
				NOTIFICATION_KEY_PAYLOAD, payload,
				NOTIFICATION_KEY_SUCCESSFUL, errorMessage == null && !cancelled ? TRUE : FALSE,
				NOTIFICATION_KEY_RESPONSE_CODE, responseCode,
				NOTIFICATION_KEY_RESPONSE_DATA, responseData);

		if (cancelled) {
			ApptentiveLog.v(PAYLOADS, "Payload sending was cancelled: %s", payload);
			return; // don't remove cancelled payloads from the queue
		}

		if (errorMessage != null) {
			ApptentiveLog.e(PAYLOADS, "Payload sending failed: %s\n%s", payload, errorMessage);
			if (appInBackground) {
				ApptentiveLog.v(PAYLOADS, "The app went to the background so we won't remove the payload from the queue");
				retrySending(5000);
				return;
			} else if (responseCode == -1) {
				ApptentiveLog.v(PAYLOADS, "Payload failed to send due to a connection error.");
				retrySending(5000);
				return;
			} else if (responseCode >= 500) {
				ApptentiveLog.v(PAYLOADS, "Payload failed to send due to a server error.");
				retrySending(5000);
				return;
			}
		} else {
			ApptentiveLog.v(PAYLOADS, "Payload was successfully sent: %s", payload);
		}

		// Only let the payload be deleted if it was successfully sent, or got an unrecoverable client error.
		deletePayload(payload.getNonce());
	}
176964
def perform(klass, id, event)
      "#{klass}_notifier".classify.constantize.create_notification(id: id, event: event.to_sym)
    end
717921
def run_once(self):
        
        self._capture_signals()
        self._start_monitor()
        try:
            self._run_worker()
        except KeyboardInterrupt:
            return
        finally:
            self._stop_monitor()
            self._restore_signals()
173714
public void processThisMessage()
    {
        Utility.getLogger().info("On message called in receiving process");
        try {
            BaseMessage messageIn = this.getMessage();
            if (messageIn != null)
            {
                BaseMessage messageReply = this.createReplyMessage(messageIn);
                this.moveScreenParamsToMessage(messageReply);
                // Step 2 - Get the body part of the message
                this.getTransport().setupReplyMessage(messageReply, messageIn, MessageInfoTypeModel.REPLY, MessageTypeModel.MESSAGE_IN);
            
                this.getTransport().processIncomingMessage(messageReply, null);
            }
        } catch(Exception ex) {
            ex.printStackTrace();
            Debug.print(ex, "Error in processing or replying to a message");
        }
    }
748551
@Override
  public void onEvent(Context context, Event event, Bundle extras) {
    LOGGER.d("received Notify Event. Event=" + event);
    if (Event.NOTIFICATION_CLICK_BTN.equals(event) || Event.NOTIFICATION_OPENED.equals(event)) {
      int notifyId = extras.getInt(BOUND_KEY.pushNotifyId, 0);
      LOGGER.d("received Push Event. notifyId:" + notifyId);
      if (0 != notifyId) {
        NotificationManager manager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
        manager.cancel(notifyId);
      }
    } else {
      LOGGER.d("unknow event.");
    }
    super.onEvent(context, event, extras);
  }
1170767
function handleNotificationPush(event) {
  logger.log('Push notification received');

  if ($Log.notificationReceived) {
    event.waitUntil(logNotificationReceived(event));
  }

  // Show notification or fallback
  if (event.data && event.data.title) {
    event.waitUntil(showNotification(event.data));
  } else if ($Notifications.fallbackURL) {
    event.waitUntil(
      self.registration.pushManager.getSubscription()
        .then(fetchNotification)
        .then(convertResponseToJson)
        .then(showNotification)
        .catch(showNotification)
    );
  } else {
    logger.warn('No notification.data and no fallbackURL.');
    event.waitUntil(showNotification());
  }
}
40554
def _handle_notification(self, method, params):
        """"""
        if method == CANCEL_METHOD:
            self._handle_cancel_notification(params['id'])
            return

        try:
            handler = self._dispatcher[method]
        except KeyError:
            log.warn("Ignoring notification for unknown method %s", method)
            return

        try:
            handler_result = handler(params)
        except Exception:  # pylint: disable=broad-except
            log.exception("Failed to handle notification %s: %s", method, params)
            return

        if callable(handler_result):
            log.debug("Executing async notification handler %s", handler_result)
            notification_future = self._executor_service.submit(handler_result)
            notification_future.add_done_callback(self._notification_callback(method, params))
208553
def _retry(self, state):
        '''
        
        '''
        state.attempt += 1
        self.debug('Starting restart attempt: %d.', state.attempt)
        if self._cmp_strategy(RestartStrategy.buryme):
            self.debug('Agent %r is going to by buried according to his '
                       'last will.', state.factory.descriptor_type)
            return self._send_buried_notifications()
        else:
            f = self._set_restart_flag()
            f.add_callback(fiber.drop_param, self._send_died_notifications)
            f.add_both(self._ensure_someone_took_responsability)
            return f
33396
@Override
  public void handleNotification(Notification notification, Object handback) {
    LocalGossipMember deadMember = (LocalGossipMember) notification.getUserData();
    GossipService.LOGGER.debug("Dead member detected: " + deadMember);
    members.put(deadMember, GossipState.DOWN);
    if (listener != null) {
      listener.gossipEvent(deadMember, GossipState.DOWN);
    }
  }
1278567
void waitForResuming() throws IOException
   {
      if (isSuspended.get())
      {
         try
         {
            latcher.get().await();
         }
         catch (InterruptedException e)
         {
            throw new IOException(e);
         }
      }
   }
740170
def run(self):
        """"""
        retries = 0
        try:
            while not self._stopping:
                try:
                    data = self.notifications_api.long_poll_notifications()
                except mds.rest.ApiException as e:
                    # An HTTP 410 can be raised when stopping so don't log anything
                    if not self._stopping:
                        backoff = 2 ** retries - random.randint(int(retries / 2), retries)
                        LOG.error('Notification long poll failed with exception (retry in %d seconds):\n%s', backoff, e)
                        retries += 1
                        # Backoff for an increasing amount of time until we have tried 10 times, then reset the backoff.
                        if retries >= 10:
                            retries = 0
                        time.sleep(backoff)
                else:
                    handle_channel_message(
                        db=self.db,
                        queues=self.queues,
                        b64decode=self._b64decode,
                        notification_object=data
                    )
                    if self.subscription_manager:
                        self.subscription_manager.notify(data.to_dict())
        finally:
            self._stopped.set()