<commit_before>[![Current build Status](https://secure.travis-ci.org/imbo/imbo-amqp-publisher.png)](http://travis-ci.org/imbo/imbo-amqp-publisher)

# imbo-amqp-publisher

AMQP plugin for Imbo, publishes 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`.

```json
{
    "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.

# License

Copyright (c) 2015, [<NAME>](mailto:<EMAIL>)

Licensed under the MIT License<commit_msg>Add warning about security and infinite loops to README<commit_after>[![Current build Status](https://secure.travis-ci.org/imbo/imbo-amqp-publisher.png)](http://travis-ci.org/imbo/imbo-amqp-publisher)

# imbo-amqp-publisher

AMQP plugin for Imbo, publishes 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`.

```json
{
    "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, [<NAME>](mailto:<EMAIL>)

Licensed under the MIT License
{'fraction_non_alphanumeric': 0.0892663534513914, 'fraction_numerical': 0.0028912179255511385, 'mean_word_length': 4.43811394891945, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4950951', 'n_tokens_mistral': 814, 'n_tokens_neox': 781, 'n_words': 345}