amqp.php 885 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. return [
  3. 'enable' => true,
  4. 'default' => [
  5. 'host' => '192.168.1.102',
  6. 'port' => 5672,
  7. 'user' => 'admin',
  8. 'password' => '123456',
  9. 'vhost' => '/',
  10. 'concurrent' => [
  11. 'limit' => 1,
  12. ],
  13. 'pool' => [
  14. 'connections' => 1,
  15. ],
  16. 'params' => [
  17. 'insist' => false,
  18. 'login_method' => 'AMQPLAIN',
  19. 'login_response' => null,
  20. 'locale' => 'en_US',
  21. 'connection_timeout' => 3.0,
  22. // 尽量保持是 heartbeat 数值的两倍
  23. 'read_write_timeout' => 6.0,
  24. 'context' => null,
  25. 'keepalive' => false,
  26. // 尽量保证每个消息的消费时间小于心跳时间
  27. 'heartbeat' => 3,
  28. 'close_on_destruct' => false,
  29. ],
  30. ],
  31. 'pool2' => [
  32. ]
  33. ];