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

Rabbitmq Bundle Consumer Generator Laravel Package

edfa3ly-backend/rabbitmq-bundle-consumer-generator

View on GitHub
Deep Wiki
Context7

RabbitMQ Consumer Generator Bundle

Software License Latest Stable Version Total Downloads

Install

Via Composer

$ composer require edfa3ly-backend/rabbitmq-bundle-consumer-generator

Description

  • An extension bundle for php-amqplib/rabbitmq-bundle that generates consumers dynamically over code , converts them to their yaml representation and writes them over your specified path.

Usage

  • Inject the GeneratorWrapper in a service of your own creation and use its methods
class ServiceExample
{  

    /** @var GeneratorWrapper $wrapper */
    protected $wrapper;
   
   /**
    * ServiceExample constructor.
    *
    * @param GeneratorWrapper $wrapper
    */
   public function __construct(
       GeneratorWrapper $wrapper
   ) {
       $this->wrapper         = $wrapper;
   }
   
   /**
    * @throws Exception
    */
   public function createConsumers()
   {
       $consumer = new ConsumerSkeleton() ;
       $consumer->setName('the name of your consumer');
       $consumer->setQueueRoutingKeys(['array of routing keys of your consumer']);
       $consumer->setExchangeType('fanout , direct , topic or headers');
       $consumer->setExchangeName('the name of your consumer's exchange');
       $consumer->setQueueName('Queue name');
       $consumer->setCallback('\path\to\your\consumer\callback::class');
       $consumer->setAmqpConsumerType('consumers or batch_consumers');
       
       $this->wrapper->writeConsumers( [$consumer], 'relative\path\to\your\consumers\yaml');
   }
}

Console

Now you can generate consumers through command just run php bin\console consumer:generate and answer the prompted questions .

Security

If you discover any security related issues, please email omarfawzi96@gmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

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.
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge