Download the PHP package erkens/bunny-bundle without Composer

On this page you can find all versions of the php package erkens/bunny-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bunny-bundle

Skrz\Bundle\BunnyBundle

Latest stable

Produce and consumer type-safe messages from RabbitMQ queues

Installation

Add as Composer dependency:

Then add BunnyBundle to Symfony Kernel:

Usage

BunnyBundle connects Skrz\Meta and Skrz\Bundle\AutowiringBundle, so that you can produce and consume type-safe messages to/from RabbitMQ.

BunnyBundle creates new 2 new stereotypes (see AutowiringBundle's description):

When BunnyBundle is added to the Symfony kernel, it registers 3 commands:

Setup in services.yml

BunnyBundle uses bunny container extension key.

After you have configured all exchanges, queues and bindings between them, run bunny:setup:

Broker entities should be created as configured.

Note that bunny:setup does not try to resolve any conflicting declarations, e.g. one time you declare queue as durable and the seconds time as not durable, you have to resolve these yourself.

Writing producers

Our example will be async processing of changes in data. Suppose you have products an categories and want to automatically categorize products according to product title and category title. However, the categorization algorithm is quite expensive, so it has to be done async. We will publish any change in product or category to change exchange.

Start with data model:

Producer - ChangeProducer - will publish changes to change exchange. Producers have beforeMethod setting - a method on producer that is called before message is serialized and sent to broker. We will pre-process message and set $hostname and $userId.

meta points to *Meta class, that will be used to serialized messages.

You can test producer from command line:

Writing consumers

When writing a consumer using BunnyBundle, think of following: consumers can fail - should messages of a failed consumer be redelivered? If so, you should create queue in services.yml and consume from given queue. If not, you should specify exchange in @Consumer annotation - an anonymous queue will be created on consumer startup.

We want messages to be redelivered, so product_categorize queue has been created, consumer will consumer from it.

Known limitations

License

The MIT license. See LICENSE file.


All versions of bunny-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
bunny/bunny Version >=0.3
skrz/autowiring-bundle Version ~1.1|~2.0
skrz/meta Version >=3.0, <4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package erkens/bunny-bundle contains the following files

Loading the files please wait ....