PHPackages                             lamoda/tactician-queue-bundle - 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. lamoda/tactician-queue-bundle

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

lamoda/tactician-queue-bundle
=============================

Symfony bundle for lamoda/tactician-queue library

1.1.0(6y ago)23MITPHPPHP ^7.1

Since Apr 10Pushed 6y ago4 watchersCompare

[ Source](https://github.com/lamoda/tactician-queue-bundle)[ Packagist](https://packagist.org/packages/lamoda/tactician-queue-bundle)[ RSS](/packages/lamoda-tactician-queue-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (9)Versions (4)Used By (0)

Lamoda Tactician Queue Middleware
=================================

[](#lamoda-tactician-queue-middleware)

[![Build Status](https://camo.githubusercontent.com/9a4e8525e8bd5402aaaa20251a22eb64533722eb871a7ac8f6269ffeb79bcabf/68747470733a2f2f7472617669732d63692e6f72672f6c616d6f64612f74616374696369616e2d71756575652d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lamoda/tactician-queue-bundle)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f7a6541521e4fb255b44cbf4199f006acf40c0b10d1d044d0f66c2ce11da8acb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c616d6f64612f74616374696369616e2d71756575652d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lamoda/tactician-queue-bundle/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/32685da8d40d92de70513a144b7bd5e54baa398967bcc1041e214a63891cff09/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c616d6f64612f74616374696369616e2d71756575652d62756e646c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lamoda/tactician-queue-bundle/?branch=master)[![Build Status](https://camo.githubusercontent.com/edc25cf14a6e263a61702dbe578d95cce1e74d56df2522a55d6522435a4609ed/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c616d6f64612f74616374696369616e2d71756575652d62756e646c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lamoda/tactician-queue-bundle/build-status/master)

Library provides middleware that gives you ability to execute commands via Tactician in async or delayed way

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

[](#installation)

### Composer

[](#composer)

```
composer require lamoda/tactician-queue-bundle
```

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

[](#configuration)

Before usage, please read the documentation for [lamoda/queue-bundle](https://github.com/lamoda/queue-bundle)

Bundle provides special middleware for tactician integration. This middleware add supports of async command execution, event with scheduling.

To enable this feature do the following:

1. Add extra configuration: ```
    lamoda_tactician_queue:
        tactician_id: tactician.commandbus # Command bus service id
        command_serializer_id: lamoda_tactician_queue.default_command_serializer # Symfony serializer
    ```
2. Add at least one strategy, that will convert commands into jobs: ```
    services:
        # ...
        several_domain_commands_strategy:
            class: Lamoda\TacticianQueue\Middleware\QueueProducerStrategy\CommandsListToCommandJobStrategy
            arguments:
                - async_command_queue
                - async_command_exchange
                - [ My\AsyncCommandInterface, My\SecondCommand ]
                - 15 # optional delay
            tags:
                - { name: tactician_queue.job_producing_strategy }
    ```
3. Add queue middleware to the list of tactician middlewares: ```
    tactician:
        commandbus:
            default:
                middleware:
                    - tactician.middleware.locking
                    - lamoda_tactician_queue.middleware # Here it is
                    - tactician.middleware.command_handler
    ```
4. Now every time you call ```
