安装/配置
PHP Manual

运行时配置

这些函数的行为受 php.ini 中的设置影响。

AMQP 配置选项
名字 默认 可修改范围 更新日志
amqp.host localhost PHP_INI_ALL
amqp.vhost / PHP_INI_ALL
amqp.port 5672 PHP_INI_ALL
amqp.login guest PHP_INI_ALL
amqp.password guest PHP_INI_ALL
amqp.auto_ack 0 PHP_INI_ALL
amqp.min_messages 0 PHP_INI_ALL
amqp.max_messages 1 PHP_INI_ALL
amqp.prefetch_count 3 PHP_INI_ALL

这是配置指令的简短说明。

amqp.host string

The host to which to connect.

amqp.vhost string

The virtual host on the broker to which to connect.

amqp.port integer

The port on which to connect.

amqp.login string

The login to use while connecting to the broker.

amqp.password string

The password to use while connecting to the broker.

amqp.auto_ack integer

Whether calls to AMQPQueue::get() and AMQPQueue::consume() should require that the client explicitly acknowledge messages. Setting this value to 1 will pass in the AMQP_AUTOACK flag to the above method calls if the flags field is omitted.

amqp.min_messages integer

The minimum number of messages to require during a call to AMQPQueue::consume().

amqp.max_messages integer

The maximum number of messages to require during a call to AMQPQueue::consume().

amqp.prefetch_count integer

The number of messages to prefect from the server during a call to AMQPQueue::get() or AMQPQueue::consume() during which the AMQP_AUTOACK flag is not set.


安装/配置
PHP Manual