@param \Generated\Shared\Transfer\QueueReceiveMessageTransfer $queueReceiveMessageTransfer

@return void
512689
public function acknowledge(QueueReceiveMessageTransfer $queueReceiveMessageTransfer)
    {
        $this->channel->basic_ack($queueReceiveMessageTransfer->getDeliveryTag());
        $this->publishOnRoutingKey($queueReceiveMessageTransfer);
    }
675237
protected function validateRequestTransfer(AdyenApiRequestTransfer $adyenApiRequestTransfer): void
    {
        $adyenApiRequestTransfer->requireCaptureRequest();

        $adyenApiRequestTransfer
            ->getCaptureRequest()
            ->requireModificationAmount()
            ->requireMerchantAccount()
            ->requireOriginalReference();

        $adyenApiRequestTransfer
            ->getCaptureRequest()
            ->getModificationAmount()
            ->requireCurrency()
            ->requireValue();
    }
255331
public function InitializeExternal(ThreadCommunicator $communicator)
    {
        $communicator->getLoop()->addReadStream($this->stream, function ($stream)
        {
            $message = fgets($stream, 1024);
            //calling the EventEmiiter::emit() function on parent
            $this->callOnParent('emit', array('stream_message', array($message)));
        });
    }
905708
public function pushMessage($queueName, $message)
    {
        $amqpMessage = new AMQPMessage($message, $this->defaultMessageParams);
        $this->getChannel()->basic_publish($amqpMessage, $this->exchange, $queueName);
    }
1050011
protected function publishOnRoutingKey(QueueReceiveMessageTransfer $queueReceiveMessageTransfer): void
    {
        if ($queueReceiveMessageTransfer->getRoutingKey()) {
            $message = new AMQPMessage($queueReceiveMessageTransfer->getQueueMessage()->getBody());
            $this->channel->basic_publish($message, $queueReceiveMessageTransfer->getQueueName(), $queueReceiveMessageTransfer->getRoutingKey());
        }
    }
716200
protected function addRabbitMqQueues(RabbitMqQueueCollectionTransfer $rabbitMqQueueCollectionTransfer, array $response)
    {
        foreach ($response as $queueInfo) {
            $rabbitMqQueueTransfer = new RabbitMqQueueTransfer();
            $rabbitMqQueueTransfer->setName($queueInfo['name']);

            $rabbitMqQueueCollectionTransfer->addRabbitMqQueue($rabbitMqQueueTransfer);
        }

        return $rabbitMqQueueCollectionTransfer;
    }
248731
public function handleSayCommand(Event $event, Queue $queue)
    {
        $params = $event->getCustomParams();
        if (count($params) < 2) {
            $this->handleSayHelp($event, $queue);
        } else {
            $channels = array_shift($params);
            $queue->ircPrivmsg($channels, implode(' ', $params));
        }
    }
135414
protected function validateRequestTransfer(AdyenApiRequestTransfer $adyenApiRequestTransfer): void
    {
        $adyenApiRequestTransfer->requireCancelOrRefundRequest();

        $adyenApiRequestTransfer
            ->getCancelOrRefundRequest()
            ->requireMerchantAccount()
            ->requireOriginalReference();
    }
1247226
public function onKernelView(GetResponseForControllerResultEvent $event): void
    {
        $request = $event->getRequest();
        if (
            $request->isMethodSafe(false)
            || $request->isMethod('DELETE')
            || !($attributes = RequestAttributesExtractor::extractAttributes($request))
            || !$attributes['receive']
        ) {
            return;
        }

        $resourceMetadata = $this->resourceMetadataFactory->create($attributes['resource_class']);
        $inputMetadata = $resourceMetadata->getOperationAttribute($attributes, 'input', [], true);
        if (\array_key_exists('class', $inputMetadata) && null === $inputMetadata['class']) {
            return;
        }

        $validationGroups = $resourceMetadata->getOperationAttribute($attributes, 'validation_groups', null, true);
        $this->validator->validate($event->getControllerResult(), ['groups' => $validationGroups]);
    }
828226
public function actionMessages($queue_name, $subscriber_id = null)
    {
        if (($subscriber_id = trim($subscriber_id)) === '') {
            $subscriber_id = null;
        }
        /** @var QueueInterface $queue */
        list($queue, $authItems) = $this->loadQueue($queue_name, ['nfy.message.read', 'nfy.message.create']);
        $this->verifySubscriber($queue, $subscriber_id);

        $formModel = new models\MessageForm();
        if ($authItems['nfy.message.create'] && isset($_POST['MessageForm'])) {
            $formModel->attributes = $_POST['MessageForm'];
            if ($formModel->validate()) {
                $queue->send($formModel->content, $formModel->category);

                return $this->redirect([
                    'messages',
                    'queue_name' => $queue_name,
                    'subscriber_id' => $subscriber_id,
                ]);
            }
        }

        $dataProvider = null;
        if ($authItems['nfy.message.read']) {
            $dataProvider = new \yii\data\ArrayDataProvider([
                'allModels' => $queue->peek($subscriber_id, 200, [
                    components\Message::AVAILABLE,
                    components\Message::RESERVED,
                    components\Message::DELETED,
                ]),
                'sort' => [
                    'attributes' => ['id'],
                    'defaultOrder' => ['id' => SORT_DESC],
                ],
            ]);
            // reverse display order to simulate a chat window, where latest message is right above the message form
            $dataProvider->setModels(array_reverse($dataProvider->getModels()));
        }

        return $this->render('messages', [
            'queue' => $queue,
            'queue_name' => $queue_name,
            'dataProvider' => $dataProvider,
            'model' => $formModel,
            'authItems' => $authItems,
        ]);
    }
594229
public function onKernelView(GetResponseForControllerResultEvent $event): void
    {
        $presentation = $event->getControllerResult();

        if (!$presentation instanceof PresentationInterface) {
            // Not the presentation instance
            return;
        }

        $data = null;
        $headers = [];

        if ($presentation->getResource()) {
            $acceptableMediaTypes = $event->getRequest()->getAcceptableContentTypes();
            $serializer = $this->serializerResolver->resolveByMediaTypes(
                get_class($presentation->getResource()),
                $acceptableMediaTypes,
                $acceptableMediaType
            );

            $serializationContext = $this->serializationContextCollector->collect();
            $data = $serializer->serialize($presentation->getResource(), $serializationContext);
            $headers = [
                'Content-Type' => $acceptableMediaType,
            ];
        }

        $response = new Response($data, $presentation->getStatusCode());
        $response->headers->add($headers);

        $event->setResponse($response);
    }
286172
@Override
    public java.util.concurrent.Future<ReceiveMessageResult> receiveMessageAsync(String queueUrl) {

        return receiveMessageAsync(new ReceiveMessageRequest().withQueueUrl(queueUrl));
    }
273206
public function execute(QueueInterface $queue, Message $message): bool
    {
        $service = $this->objectManager->get($this->className);
        $this->deferMethodCallAspect->setProcessingJob(true);
        try {
            $methodName = $this->methodName;
            call_user_func_array([$service, $methodName], $this->arguments);
            return true;
        } catch (\Exception $exception) {
            throw $exception;
        } finally {
            $this->deferMethodCallAspect->setProcessingJob(false);
        }
    }
679292
public function sendQueueMessage($queueName, BrokeredMessage $brokeredMessage)
    {
        $path = sprintf(Resources::SEND_MESSAGE_PATH, $queueName);
        $this->sendMessage($path, $brokeredMessage);
    }
482165
public function handleGhost(ServerEvent $event, Queue $queue)
    {
        if ($this->ghostNick === null) {
            return;
        }

        // Attempt to kill the ghost connection
        $queue->ircPrivmsg($this->botNick, 'GHOST ' . $this->ghostNick . ' ' . $this->password);
    }
1183709
public void transferListeners(CoherentManagerEventQueue eventQueue)
    {
        synchronized (this.listeners)
        {
            synchronized (eventQueue.listeners)
            {
                Iterator<FilteredManagerListenerWrapper> itr = eventQueue.listeners.iterator();
                while (itr.hasNext())
                {
                    FilteredManagerListenerWrapper listener = itr.next();

                    this.addListener(listener._listener);
                }
                eventQueue.listeners.clear();
            }
        }
    }
580083
public function addMessageToQueue($message, $queue)
    {
        $this->queue->sendMessage([
            'QueueUrl' => $this->getQueueURL($queue),
            'MessageBody' => $message,
        ]);
    }