I have migrated my app from ZF2 to ZF3, but HumusAmqpModule now is not working.
I had version v0.3.1 before and config like this:
return [
'controllers' => [
'factories' => [
TopicProducerController::class => TopicProducerControllerFactory::class,
]
],
'humus_amqp_module' => [
'exchanges' => [
'opm-exchange' => [
'name' => 'opm-exchange',
'type' => 'direct',
'arguments' => [],
],
'demo.error' => [
'name' => 'demo.error',
'type' => 'direct',
'arguments' => [],
],
],
'queues' => [
'opm-mail' => [
'name' => 'opm-mail-queue',
'exchange' => 'opm-exchange',
'routing_keys' => [],
'arguments' => [
'x-dead-letter-exchange' => 'demo.error' // must be defined as exchange before
],
'bind_arguments' => [],
],
],
'connections' => [
'default' => [
'host' => 'localhost',
'port' => 5672,
'login' => 'guest',
'password' => 'guest',
'vhost' => '/',
'persistent' => true,
'read_timeout' => 1, //sec, float allowed
'write_timeout' => 1, //sec, float allowed
],
],
'producers' => [
'opm-producer' => [
'exchange' => 'opm-exchange',
'qos' => [
'prefetch_size' => 0,
'prefetch_count' => 10
],
'auto_setup_fabric' => true
],
],
'consumers' => [
'opm-consumer' => [
'queues' => [
'opm-mail'
],
'auto_setup_fabric' => true,
'callback' => 'mail',
'idle_timeout' => 10,
'logger' => 'consumer-logger',
'error_callback' => 'errorcallback'
],
],
'plugin_managers' => [
'callback' => [
'invokables' => [
'echo' => EchoCallback::class,
'error' => EchoErrorCallback::class,
'poweroftwo' => PowerOfTwoCallback::class,
'randomint' => RandomIntCallback::class,
'errorcallback' => ErrorCallback::class,
],
'factories' => [
'mail' => MailCallbackFactory::class
]
]
]
],
];
{
"require": {
"php": "~7.0",
"ext-amqp": ">=1.7.0",
"ext-zip": "*",
"ext-intl": "*",
"ext-mbstring": "*",
"ext-gd": "*",
"ext-xml": "*",
"ext-curl": "*",
"ext-bcmath": "*",
"roave/security-advisories": "dev-master",
"zendframework/zendframework": "^3.0",
"zendframework/zend-mvc-console": "^1.1",
"phpoffice/phpexcel": "dev-master",
"imagine/Imagine": "dev-master",
"php-amqplib/php-amqplib": "2.6.2",
"prolic/humus-amqp": "^1.1",
"prolic/humus-amqp-module": "^1.0",
...
}
}
What I need to change to make everything work.
Thanks.
I have migrated my app from ZF2 to ZF3, but HumusAmqpModule now is not working.
I had version
v0.3.1before and config like this:After migration my composer.json looks like that:
Also in
application.config.phpinmodulessection addedHumusAmqpModuleWhat I need to change to make everything work.
Thanks.