PHP code example of romanfedorskij / message-bus-amphp

1. Go to this page and download the library: Download romanfedorskij/message-bus-amphp 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/ */

    

romanfedorskij / message-bus-amphp example snippets




declare(strict_types=1);

use Wolfcharaa\MessageBus\Amp\Execution\AmpFiberExecutionStrategy;
use Wolfcharaa\MessageBus\Flow\FlowDefinition;
use Wolfcharaa\MessageBus\Flow\FlowRegistry;

$flows = new FlowRegistry(
    FlowDefinition::sync('default'),
    FlowDefinition::sync('concurrent')
        ->strategy(AmpFiberExecutionStrategy::class),
);

new AmpFiberExecutionStrategy(throwOnFailure: false);