python rabbitmq连接池_python使用pika链接rabbitmq Connection reset by peer 解决办法

def __init__(self, #pylint: disable=R0913,R0914,R0912

host=_DEFAULT,

port=_DEFAULT,

virtual_host=_DEFAULT,

credentials=_DEFAULT,

channel_max=_DEFAULT,

frame_max=_DEFAULT,

heartbeat=_DEFAULT,

ssl=_DEFAULT,

ssl_options=_DEFAULT,

connection_attempts=_DEFAULT,

retry_delay=_DEFAULT,

socket_timeout=_DEFAULT,

locale=_DEFAULT,

backpressure_detection=_DEFAULT,

blocked_connection_timeout=_DEFAULT,

client_properties=_DEFAULT,

tcp_options=_DEFAULT,**kwargs):"""Create a new ConnectionParameters instance. See `Parameters` for

default values.

:param str host: Hostname or IP Address to connect to

:param int port: TCP port to connect to

:param str virtual_host: RabbitMQ virtual host to use

:param pika.credentials.Credentials credentials: auth credentials

:param int channel_max: Maximum number of channels to allow

:param int frame_max: The maximum byte size for an AMQP frame

:param int heartbeat: Heartbeat timeout. Max between this value

and server's proposal will be used as the heartbeat timeout. Use 0

to deactivate heartbeats and None to accept server's proposal.

:param bool ssl: Enable SSL

:param dict ssl_options: None or a dict of arguments to be passed to

ssl.wrap_socket

:param int connection_attempts: Maximum number of retry attempts

:param int|float retry_delay: Time to wait in seconds, before the next

:param int|float socket_timeout: Use for high latency networks

:param str locale: Set the locale value

:param bool backpressure_detection: DEPRECATED in favor of

`Connection.Blocked` and `Connection.Unblocked`. See

`Connection.add_on_connection_blocked_callback`.

:param blocked_connection_timeout: If not None,

the value is a non-negative timeout, in seconds, for the

connection to remain blocked (triggered by Connection.Blocked from

broker); if the timeout expires before connection becomes unblocked,

the connection will be torn down, triggering the adapter-specific

mechanism for informing client app about the closed connection (

e.g., on_close_callback or ConnectionClosed exception) with

`reason_code` of `InternalCloseReasons.BLOCKED_CONNECTION_TIMEOUT`.

:type blocked_connection_timeout: None, int, float

:param client_properties: None or dict of client properties used to

override the fields in the default client properties reported to

RabbitMQ via `Connection.StartOk` method.

:param heartbeat_interval: DEPRECATED; use `heartbeat` instead, and

don't pass both

:param tcp_options: None or a dict of TCP options to set for socket"""

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值