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

Rabbit Bundle Laravel Package

arthem/rabbit-bundle

View on GitHub
Deep Wiki
Context7

ArthemRabbitBundle

A simple and faster setup to work with consumer through handlers.

Installation

composer require arthem/rabbit-bundle

Add auto-tag feature:

# config/services.yaml

services:
    # ...
    _instanceof:
        # ...
        Arthem\Bundle\RabbitBundle\Consumer\Event\EventMessageHandlerInterface:
            tags: ['arthem_rabbit.event_handler']

Handlers

Every message are based on type which allow to define their corresponding handler. A handler can support multiple types. Handlers and types can be split into queues

By default, this bundle configures:

  • one queue named event
  • its direct exchange named x-event
  • the corresponding consumer named event

In opposite to RabbitMQBundle, this one provides only one message producer. The message type allows to send message to the appropriate exchange.

Failure

Failed message processing can be logged in a database table.

First enable the feature:

# config/packages/arthem_rabbit.yaml

arthem_rabbit:
    failure: ~

Create your own Entity which must implement Arthem\Bundle\RabbitBundle\Model\FailedEventInterface:

<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use Arthem\Bundle\RabbitBundle\Model\FailedEvent as BaseFailedEvent;

/**
 * @ORM\Entity
 */
class FailedEvent extends BaseFailedEvent
{
    /**
     * @var string
     *
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue
     */
    protected $id;

    public function getId(): string
    {
        return (string)$this->id;
    }
}
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.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware