purgeQueue example

usleep(5000);
        }

        $this->assertEquals('{"message": "Hi"}', $encoded['body']);
        $this->assertEquals(['type' => DummyMessage::class, DummyMessage::class => 'special']$encoded['headers']);
    }

    private function clearSqs(string $dsn): void
    {
        $url = parse_url($dsn);
        $client = new SqsClient(['endpoint' => "http://{$url['host']}:{$url['port']}"]);
        $client->purgeQueue([
            'QueueUrl' => $client->getQueueUrl(['QueueName' => ltrim($url['path'], '/')])->getQueueUrl(),
        ]);
    }
}
Home | Imprint | This part of the site doesn't use cookies.