diff --git a/app/Amqp/Consumer/couponRebateConsumer.php b/app/Amqp/Consumer/couponRebateConsumer.php new file mode 100644 index 0000000..7b04668 --- /dev/null +++ b/app/Amqp/Consumer/couponRebateConsumer.php @@ -0,0 +1,28 @@ +getBody()); + return Result::ACK; + } + + public function isEnable(): bool + { + return parent::isEnable(); + } +} diff --git a/config/autoload/amqp.php b/config/autoload/amqp.php new file mode 100644 index 0000000..e14780a --- /dev/null +++ b/config/autoload/amqp.php @@ -0,0 +1,33 @@ + [ + 'host' => env('RQM_HOST', 'localhost'), + 'port' => 5672, + 'user' => env('RQM_USER','guest'), + 'password' => env('RQM_PASSWORD','guest'), + 'vhost' => '/', + 'concurrent' => [ + 'limit' => 1, + ], + 'pool' => [ + 'min_connections' => 1, + 'max_connections' => 10, + 'connect_timeout' => 10.0, + 'wait_timeout' => 3.0, + 'heartbeat' => -1, + ], + 'params' => [ + 'insist' => false, + 'login_method' => 'AMQPLAIN', + 'login_response' => null, + 'locale' => 'en_US', + 'connection_timeout' => 3.0, + 'read_write_timeout' => 6.0, + 'context' => null, + 'keepalive' => false, + 'heartbeat' => 3, + 'close_on_destruct' => false, + ], + ] +];