Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Roadrunner Jobs Laravel Package

spiral/roadrunner-jobs

Spiral RoadRunner Jobs driver and client for PHP. Run background tasks with RoadRunner’s jobs plugin, supporting queue configuration, message serialization, consuming and publishing jobs, and integrating into Spiral apps and workers for fast, reliable async processing.

View on GitHub
Deep Wiki
Context7
v4.7.0

What's Changed

New Contributors

Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.6.3...v4.7.0

v4.6.3

What's Changed

New Contributors

Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.6.2...v4.6.3

v4.6.2

What's Changed

New Contributors

Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.6.1...v4.6.2

v4.6.1

What's Changed

Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.6.0...v4.6.1

v4.6.0

What's Changed

  • Added support for the Google Pub/Sub driver. This driver is available since RoadRunner v2024.2.0.
  • Added support for google/protobuf v4.x.

Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.5.0...v4.6.0

v4.5.0

What's Changed

New Contributors

Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.4.0...v4.5.0

v4.4.0

What's Changed

Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.3.1...v4.4.0

v4.3.1

What's Changed

New Contributors

Full Changelog: https://github.com/roadrunner-php/jobs/compare/4.3.0...v4.3.1

4.3.0

What's Changed

Full Changelog: https://github.com/roadrunner-php/jobs/compare/4.1.0...4.3.0

4.2.0

What's Changed

New Contributors

Full Changelog: https://github.com/roadrunner-php/jobs/compare/4.0.1...4.2.0

4.1.0

What's Changed

Full Changelog: https://github.com/roadrunner-php/jobs/compare/4.0.0...4.0.1

4.0.0

Features

  • Upgraded to PHP 8.1
  • Upgraded to PHPUnit 10
  • Upgraded to Psalm 5
  • Added reusable Gh Actions
  • Added metapackage spiral/roadrunner:^2023

What's Changed

Remove built-in serializers for payload serialization/deserialization.

It now allows application to implement their own serialization methods and send the payload as a string or an instance of a Stringable object.

by @butschster in https://github.com/roadrunner-php/jobs/pull/47

Updated create info Kafka driver

use Spiral\RoadRunner\Jobs\Queue\KafkaCreateInfo;
use Spiral\RoadRunner\Jobs\Queue\Kafka\ProducerOptions;
use Spiral\RoadRunner\Jobs\Queue\Kafka\ConsumerOptions;
use Spiral\RoadRunner\Jobs\Queue\Kafka\ConsumerGroupOptions;


$info = new KafkaCreateInfo(
   name: 'foo',
   priority: 10,
   autoCreateTopicsEnable: false,
   producerOptions: new ProducerOptions(...),
   consumerOptions: new ConsumerOptions(...),
   groupOptions: new ConsumerGroupOptions(...),
);

by @butschster in https://github.com/roadrunner-php/jobs/pull/51

Full Changelog: https://github.com/roadrunner-php/jobs/compare/v2.6.0...4.0.0

v2.9.0

What's Changed

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.8.1...v2.9.0

v2.8.0
v2.7.0

What's Changed

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.6.0...v2.7.0

v2.5.1

What's Changed

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.5.0...v2.5.1

v2.5.0

What's Changed

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.4.0...v2.5.0

v2.4.0

What's Changed

Create kafka pipeline

use Spiral\RoadRunner\Jobs\Queue\KafkaCreateInfo;
use Spiral\RoadRunner\Jobs\Jobs;

$jobs = new Jobs(RPC::create('tcp://127.0.0.1:6001'));

$kafkaCreateInfo = new KafkaCreateInfo(
     name: 'kafka-queue',
     topic: 'subscription',
     maxOpenRequests: 1000
);

$queue = $jobs->create($kafkaCreateInfo);

Push job into kafka pipeline

use Spiral\RoadRunner\Jobs\KafkaOptions;
use Spiral\RoadRunner\Jobs\Queue\Kafka\PartitionOffset;

$queue->dispatch(
      $queue->create(
            'job:name',
            ['foo' => 'bar'],
            new KafkaOptions(
                  topic: 'some-topic',
                  metadata: 'foo-bar',
                  offset: PartitionOffset::OFFSET_NEWEST
            )
      )
);

Changing options in a prepared task:

$queue = $jobs->create($kafkaCreateInfo);
        
$task = $queue->create(
    'job:name',
    ['foo' => 'bar'],
    new KafkaOptions(
        topic: 'some-topic',
        metadata: 'foo-bar',
        offset: PartitionOffset::OFFSET_NEWEST
    )
);
        
$queue->dispatch($task->withOptions(new KafkaOptions(
    topic: 'other',
    metadata: 'foo-bar',
    offset: PartitionOffset::OFFSET_NEWEST
)));

$queue->dispatch($task->withOptions($task->getOptions()->withTopic('other')));
$queue->dispatch($task->withDelay(10));

Create boltdb pipeline

use Spiral\RoadRunner\Jobs\Queue\BoltdbCreateInfo;
use Spiral\RoadRunner\Jobs\Jobs;

$jobs = new Jobs(RPC::create('tcp://127.0.0.1:6001'));

$boltdbCreateInfo = new BoltdbCreateInfo(
     name: 'boltdb-queue',
     file: 'rr.db'
);

$queue = $jobs->create($boltdbCreateInfo);

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.3.2...v2.4.0

v2.3.2
v2.3.1

What's Changed

New Contributors

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.3.0...v2.3.1

v2.3.0

What's Changed

New Contributors

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.2.0...v2.3.0

v2.1.1
v2.1.0

What's Changed

use Spiral\RoadRunner\Jobs\Queue\MemoryCreateInfo;
use Spiral\RoadRunner\Jobs\Options;
use Spiral\RoadRunner\Jobs\Jobs;

// Create with default values
$options = new Options();

// Jobs service
$jobs = new Jobs(RPC::create('tcp://127.0.0.1:6001'));

// Select "test" queue from jobs
$queue = $jobs->connect('test');

// or create a new queue
$queue = $jobs->create(new MemoryCreateInfo('local'));

// Set default auto ack for all tasks
$queue = $queue->withDefaultOptions(
     $options->withAutoAck(true)
);

// Create a new task with custom auto ack
$task = $queue->push(
     'task_name', 
     ['foo' => 'bar'], 
     (new Options())->withAutoAck(false)
);

// or change auto ack for created task
$task = $queue->create(
     'task_name', 
     ['foo' => 'bar']
)->withAutoAck(false);

$queue->dispatch($task);

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.0.5...v2.1.0

v2.0.5

What's Changed

New Contributors

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.0.4...v2.0.5

v2.0.4

What's Changed

New Contributors

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.0.2...v2.0.4

v2.0.2

What's Changed

New Contributors

Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.0.0...v2.0.1

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport