amqp.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. use function Hyperf\Support\env;
  12. return [
  13. 'default' => [
  14. 'host' => env('AMQP_HOST', 'localhost'),
  15. 'port' => (int) env('AMQP_PORT', 5672),
  16. 'user' => env('AMQP_USER', 'guest'),
  17. 'password' => env('AMQP_PASSWORD', 'guest'),
  18. 'vhost' => env('AMQP_VHOST', '/'),
  19. 'concurrent' => [
  20. 'limit' => 1,
  21. ],
  22. 'pool' => [
  23. 'connections' => 2,
  24. ],
  25. 'params' => [
  26. 'insist' => false,
  27. 'login_method' => 'AMQPLAIN',
  28. 'login_response' => null,
  29. 'locale' => 'en_US',
  30. 'connection_timeout' => 3,
  31. 'read_write_timeout' => 6,
  32. 'context' => null,
  33. 'keepalive' => true,
  34. 'heartbeat' => 3,
  35. 'channel_rpc_timeout' => 0.0,
  36. 'close_on_destruct' => false,
  37. 'max_idle_channels' => 10,
  38. ],
  39. ],
  40. ];