PHPackages                             fivelab/amqp-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. fivelab/amqp-bundle

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

fivelab/amqp-bundle
===================

The bundle for integrate fivelab/amqp library with Symfony application

v2.3.0(5mo ago)226.9k↓40.9%6MITPHPPHP ^8.2CI passing

Since Sep 29Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/FiveLab/AmqpBundle)[ Packagist](https://packagist.org/packages/fivelab/amqp-bundle)[ RSS](/packages/fivelab-amqp-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (19)Used By (0)

Russia has become a terrorist state.
------------------------------------

[](#russia-has-become-a-terrorist-state)

  #StandWithUkraine

AMQP Bundle
===========

[](#amqp-bundle)

[![Build Status](https://github.com/FiveLab/AmqpBundle/workflows/Testing/badge.svg?branch=master)](https://github.com/FiveLab/AmqpBundle/actions)

Integrate the [AMQP](https://github.com/FiveLab/Amqp) library with you Symfony application.

Sample configuration
--------------------

[](#sample-configuration)

```
fivelab_amqp:
    connections:
        default:
            dsn: 'amqp://guest:guest@127.0.0.1:5672/%2f?read_timeout=30&other_parameter=some'

    exchanges:
        primary:
            connection: default
            name: direct
            type: direct
            durable: true

    publishers:
        primary:
            exchange: primary

    queues:
        collect_reports:
            name: reports.collect
            connection: default
            bindings:
                - { exchange: primary, routing: customer.register }
                - { exchange: primary, routing: customer.activate }

    consumers:
        collect_reports:
            queue: collect_repots
            message_handlers: 'acme.service.collect_reports_message_handler'
```

Initialize
----------

[](#initialize)

After install and configure bundle, you can initialize all exchanges and queues:

```
./bin/console event-broker:initialize:exchanges
./bin/console event-broker:initialize:queues
```

After initialize exchanges and queues you can run consumer:

```
./bin/console event-broker:consumer:run collect_reports
```

For debug, you can use verbosity levels.

Publish messages
----------------

[](#publish-messages)

For publish messages to broker, we use `Publisher` system. You can configure more publishers.

```
