PHP code example of snortlin / google-pubsub-messenger
1. Go to this page and download the library: Download snortlin/google-pubsub-messenger library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
snortlin / google-pubsub-messenger example snippets
use Snortlin\GooglePubsubMessenger\Transport\Stamp\OrderingKeyStamp
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\MessageBusInterface;
public function index(MessageBusInterface $bus)
{
$bus->dispatch(new MyMessage('...'), [
new OrderingKeyStamp('my_ordering_key'),
]);
// ...
}