amqp.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. <<<<<<< HEAD
  3. declare(strict_types=1);
  4. =======
  5. declare(strict_types=1);
  6. >>>>>>> collector_1106_fr
  7. use function Hyperf\Support\env;
  8. return [
  9. 'enable' => true,
  10. 'default' => [
  11. 'host' => env('AMQP_HOST', '192.168.1.201'),
  12. 'port' => (int)env('AMQP_PORT', 5672),
  13. 'user' => env('AMQP_USER', 'admin'),
  14. 'password' => env('AMQP_PASSWORD', '123456'),
  15. 'vhost' => '/',
  16. 'concurrent' => [
  17. 'limit' => 1,
  18. ],
  19. 'pool' => [
  20. 'connections' => 1,
  21. ],
  22. 'params' => [
  23. 'insist' => false,
  24. 'login_method' => 'AMQPLAIN',
  25. 'login_response' => null,
  26. 'locale' => 'en_US',
  27. 'connection_timeout' => 300.0,
  28. // 尽量保持是 heartbeat 数值的两倍
  29. 'read_write_timeout' => 600.0,
  30. 'context' => null,
  31. 'keepalive' => false,
  32. // 尽量保证每个消息的消费时间小于心跳时间
  33. 'heartbeat' => 3,
  34. 'close_on_destruct' => false,
  35. ],
  36. ],
  37. <<<<<<< HEAD
  38. 'pool2' => [
  39. ]
  40. =======
  41. >>>>>>> collector_1106_fr
  42. ];