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.
Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.6.3...v4.7.0
Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.6.2...v4.6.3
Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.6.1...v4.6.2
Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.6.0...v4.6.1
Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.5.0...v4.6.0
ack, nack, and requeue methods, which were introduced in RoadRunner v2024.1.5 by @msmakouz in https://github.com/roadrunner-php/jobs/pull/66topic parameter name in the AMQP driver configuration by @realization in https://github.com/roadrunner-php/jobs/pull/65Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.4.0...v4.5.0
Full Changelog: https://github.com/roadrunner-php/jobs/compare/v4.3.1...v4.4.0
prefetch option in the Memory driver by @gam6itko in https://github.com/roadrunner-php/jobs/pull/62Full Changelog: https://github.com/roadrunner-php/jobs/compare/4.3.0...v4.3.1
Full Changelog: https://github.com/roadrunner-php/jobs/compare/4.1.0...4.3.0
Full Changelog: https://github.com/roadrunner-php/jobs/compare/4.0.1...4.2.0
Full Changelog: https://github.com/roadrunner-php/jobs/compare/4.0.0...4.0.1
spiral/roadrunner:^2023It 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
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
consume_all option to the AMQPCreateInfo DTO by @butschster in https://github.com/spiral/roadrunner-jobs/pull/44Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.8.1...v2.9.0
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.8.0...v2.9.0
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.7.0...v2.8.0
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.6.0...v2.7.0
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.5.1...v2.6.0
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.5.0...v2.5.1
Jobs::isAvailable method as deprecated. by @butschster in https://github.com/spiral/roadrunner-jobs/pull/23Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.4.0...v2.5.0
opis/closure serializer by @msmakouz in https://github.com/spiral/roadrunner-jobs/pull/19Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.3.0...v3.0.0
kafka pipelineuse 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);
kafka pipelineuse 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
)
)
);
$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));
boltdb pipelineuse 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
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.3.1...v2.3.2
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.3.0...v2.3.1
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.2.0...v2.3.0
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.1.1...v2.2.0
auto_ack option to the Job class by @butschster in https://github.com/spiral/roadrunner-jobs/pull/14use 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
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.0.4...v2.0.5
Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.0.2...v2.0.4
queue key with name by @roxblnfk in https://github.com/spiral/roadrunner-jobs/pull/7Full Changelog: https://github.com/spiral/roadrunner-jobs/compare/v2.0.0...v2.0.1
How can I help you explore Laravel packages today?