aimeos/ai-mqueue

Aimeos 3rd party message queue integration

Installs: 65

Dependents: 0

Suggesters: 0

Security: 0

Stars: 9

Watchers: 4

Forks: 2

Open Issues: 0

Type:aimeos-extension

2024.10.2 2024-11-11 11:48 UTC

README

Aimeos logo

Aimeos file system extension

Build Status Coverage Status Scrutinizer Code Quality License

The Aimeos message queue extension contains adapter for pushing and retrieving arbitrary messages to remote message queue servers to. Thus, processing of resource intensive tasks can be postponed and offloaded to another server. This is necessary for scaling really big setups.

Table of contents

Installation

As every Aimeos extension, the easiest way is to install it via composer. If you don't have composer installed yet, you can execute this string on the command line to download it:

php -r "readfile('https://getcomposer.org/installer');" | php -- --filename=composer

To add the extionsion to your composer-based installation, execute:

composer req "aimeos/ai-mqueue"

These command will install the Aimeos extension into the extension directory and it will be available immediately.

Configuration

All message queue adapters are configured below the resource/mq configuration key, e.g. in the resource section of your config file:

'resource' => [
	'mq' => [
		// message queue adapter specific configuration
	],
],

AMQP (RabbitMQ, Azure, Apache ActiveMQ + Qpid, MQlight and others)

To use the AMQP adapter, add this line to the require section of your composer.json or (composer.aimeos.json) file:

"require": [
    "php-amqplib/php-amqplib": "~3.0",
    ...
],

The available configuration options are the one offered by the php-amqplib library:

'mq' => [
	'adapter' => 'AMQP',
	'host' => 'localhost', // optional
	'port' => 5672, // optional
	'username' => 'guest', // optional
	'password' => 'guest', // optional
	'vhost' => '/', // optional
	'insist' => false, // optional
	'login_method' => 'AMQPLAIN', // optional
	'login_response' => null, // optional
	'locale' => 'en_US', // optional
	'connection_timeout' => 3.0, // optional
	'read_write_timeout' => 3.0, // optional
	'keepalive' => false, // optional
	'heartbeat' => 0, // optional
],

Beanstalk

To use the Beanstalk adapter, add this line to the require section of your composer.json or (composer.aimeos.json) file:

"require": [
    "pda/pheanstalk": "~3.0",
    ...
],

The available configuration options are the one offered by the pheanstalk library:

'mq' => [
	'adapter' => 'Beanstalk',
	'host' => 'localhost', // optional
	'port' => 11300, // optional
	'conntimeout' => 3, // optional
	'readtimeout' => 30, // optional
	'persist' => false, // optional
],

Stomp

To use the Stomp adapter, make sure you've installed the "stomp" PHP extension. Most of the time there's already a package for the most widely used Linux distributions available.

The available configuration options are:

'mq' => [
	'adapter' => 'Stomp',
	'uri' => 'tcp://localhost:61613', // optional
	'username' => null, // optional
	'password' => null, // optional
],

License

The Aimeos message queue extension is licensed under the terms of the LGPLv3 Open Source license and is available for free.

Links