2017 © Pedro Peláez
 

library amqp-workers

This library provides more object-oriented way to create amqp workers and producers

image

enl/amqp-workers

This library provides more object-oriented way to create amqp workers and producers

  • Monday, November 27, 2017
  • by enl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 130 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 4 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

AMQP Workers library

Latest Version on Packagist ![Software License][ico-license] Build Status Scrutinizer Code Quality Total Downloads, (*1)

All this library does is providing more fluent experience with AMQP. Original phpamqplib has very strange approach to its functions declarations., (*2)

I decided to create a tiny layer of abstraction which provides a bit more flexible interface:, (*3)

$consumer = Consumer::factory($connection)
    ->withQueue(new Queue('consume_from'))
    ->withWorker($worker)
    ->run();

That is very short basic setup, Consumer has much more functions. Read the manual for more detailed description., (*4)

Features

  • More fluent and flexible interface than original php-amqplib library;
  • Very lazy approach, amqp-related stuff is called only when you call run or produce functions.

Install

composer require enl/amqp-workers

Usage


// Create AMQPConnection $connection = new AMQPLazyConnection(); // We're using static `factory` function only for convenience with fluent interface $consumer = Consumer::factory($connection) // set queue definition. all parameters are default ->withQueue(new Queue('consume_from')) // Worker is an object of WorkerInterface which handles given message body ->withWorker($worker) // declare and start consuming the queue ->run();

Change log

Please see CHANGELOG for more information what has changed recently., (*5)

Testing

composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*6)

Security

If you discover any security related issues, please email deadyaga@gmail.com instead of using the issue tracker., (*7)

Credits

License

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

The Versions

27/11 2017

dev-master

9999999-dev https://github.com/enl/amqpworkers

This library provides more object-oriented way to create amqp workers and producers

  Sources   Download

MIT License

The Requires

 

The Development Requires

rabbitmq amqp workers

08/09 2016

v1.0.0

1.0.0.0 https://github.com/enl/amqpworkers

This library provides more object-oriented way to create amqp workers and producers

  Sources   Download

MIT License

The Requires

 

The Development Requires

rabbitmq amqp workers