imbo / imbo-amqp-publisher
AMQP event publisher plugin for Imbo
Requires
- php: >=5.4.0
- videlalvaro/php-amqplib: ^2.6
Requires (Dev)
- ext-imagick: >=3.0.1
- beberlei/assert: ^2.4
- behat/behat: ^3.0
- guzzle/plugin-history: ^3.9
- imbo/imbo: ~2.1.0
- imbo/imbo-phpcs-standard: dev-master
- imbo/imboclient: ^1.2
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2023-04-28 03:53:24 UTC
README
Imbo AMQP publisher plugin
AMQP publisher plugin for Imbo that can be used to publish events to a queue.
Installation
Setting up the dependencies
If you've installed Imbo through composer, getting the AMQP publisher up and running is really simple. Simply add imbo/imbo-amqp-publisher
as a dependency and run composer update
.
{ "require": { "imbo/imbo-amqp-publisher": "dev-master", } }
Configuring Imbo
Once you've got the dependencies installed, you need to configure the plugin. An example configuration file can be found in config/config.dist.php
. Simply copy the file to your Imbo config
folder, adjust the parameters and name it amqp-publisher.php
for instance. Imbo should pick it up automatically and start publishing to your configured AMQP host.
A word of warning
Be careful not to have a consumer use the same resource as the messages it received a message from did. For example, if the consumer receives a message with the image.get
event and then proceeds to load that image, this will trigger another image.get
event to be fired, and you've got an infinite loop going.
You should also be careful about who has access to the AMQP server/queue, as the messages can potentially include sensitive information. On the same note, make sure to only subscribe to events you actually want to publish - for instance, the keys.put
resource would expose private keys, which is not something you usually want.
License
Copyright (c) 2015-2016, Espen Hovlandsdal, Licensed under the MIT License.