PHPackages                             spiral/roadrunner-jobs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. spiral/roadrunner-jobs

ActiveLibrary[Queues &amp; Workers](/categories/queues)

spiral/roadrunner-jobs
======================

RoadRunner Queues (Jobs) plugin API library

v4.7.0(6mo ago)272.2M↓28.2%14[1 PRs](https://github.com/roadrunner-php/jobs/pulls)13MITPHPPHP &gt;=8.1CI passing

Since Aug 20Pushed 6mo ago4 watchersCompare

[ Source](https://github.com/roadrunner-php/jobs)[ Packagist](https://packagist.org/packages/spiral/roadrunner-jobs)[ Docs](https://roadrunner.dev/)[ GitHub Sponsors](https://github.com/sponsors/roadrunner-server)[ RSS](/packages/spiral-roadrunner-jobs/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (36)Used By (13)

[   ![](https://github.com/roadrunner-server/.github/assets/8040338/040fb694-1dd3-4865-9d29-8e0748c2c8b8) ](https://roadrunner.dev)RoadRunner Jobs Plugin
======================

[](#roadrunner-jobs-plugin)

[![PHP Version Require](https://camo.githubusercontent.com/9df8186e73da5b9163bfb2c6bd1b89018d84eff17756410ce2dfb047d5fb4457/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f726f616472756e6e65722d6a6f62732f726571756972652f706870)](https://packagist.org/packages/spiral/roadrunner-jobs)[![Latest Stable Version](https://camo.githubusercontent.com/49e173ebb860fc49a8f4b9e3e644b14e8fb8f3a5f9297f1d5d80c559e993a69d/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f726f616472756e6e65722d6a6f62732f762f737461626c65)](https://packagist.org/packages/spiral/roadrunner-jobs)[![phpunit](https://github.com/spiral/roadrunner-jobs/actions/workflows/phpunit.yml/badge.svg)](https://github.com/spiral/roadrunner-jobs/actions)[![psalm](https://github.com/spiral/roadrunner-jobs/actions/workflows/psalm.yml/badge.svg)](https://github.com/spiral/roadrunner-jobs/actions)[![Codecov](https://camo.githubusercontent.com/4785f40ee997c2e0c6c6b48f6ce44e3469046e93cd5527a0c262a88a7e33bc9b/68747470733a2f2f636f6465636f762e696f2f67682f726f616472756e6e65722d7068702f6a6f62732f6272616e63682f342e782f67726170682f62616467652e737667)](https://codecov.io/gh/roadrunner-php/jobs/)[![Total Downloads](https://camo.githubusercontent.com/38b81e83b85450df8b8fee55e96c9ade5cd1c51f5e7efad2f8d5787df7ed9e58/68747470733a2f2f706f7365722e707567782e6f72672f73706972616c2f726f616472756e6e65722d6a6f62732f646f776e6c6f616473)](https://packagist.org/packages/spiral/roadrunner-jobs)[![StyleCI](https://camo.githubusercontent.com/199b3e339b32ccffde6ebe3bda10912c11b0d641771b7aa07b2bbaaf9a21782e/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3338383737323133352f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/388772135?branch=master)[![](https://camo.githubusercontent.com/4442b73a11753b80fdd7b442ddbfaf8383902c8b9ffa66ed1718e8c62e102f2e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646973636f72642d636861742d6d6167656e74612e737667)](https://discord.gg/spiralphp)

This repository contains the codebase PHP bridge using RoadRunner Jobs plugin.

Installation
------------

[](#installation)

To install application server and Jobs codebase

```
composer require spiral/roadrunner-jobs
```

You can use the convenient installer to download the latest available compatible version of RoadRunner assembly:

```
composer require spiral/roadrunner-cli --dev
vendor/bin/rr get
```

Configuration
-------------

[](#configuration)

First you need to add at least one jobs adapter to your RoadRunner configuration. For example, such a configuration would be quite feasible to run:

```
rpc:
  listen: tcp://127.0.0.1:6001

server:
  command: php consumer.php
  relay: pipes

jobs:
  consume: [ "local" ]
  pipelines:
    local:
      driver: memory
      config:
        priority: 10
        prefetch: 10000
```

> **Note**Read more about all available drivers on the [documentation](https://docs.roadrunner.dev/queues-and-jobs/overview-queues) page.

After starting the server with this configuration, one driver named `local` will be available to you.

Usage
-----

[](#usage)

### Producer

[](#producer)

The following code will allow writing and reading an arbitrary value from the RoadRunner server.

```
