QoS策略

本文详细介绍了在消息传递系统中不同QoS(服务质量)策略之间的兼容性,包括可靠性、持久性、截止时间等关键策略的设置及其相互作用。通过表格形式清晰地展示了各种策略组合是否能够成功建立连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  • History

    • Keep last: only store up to N samples, configurable via the queue depth option.

    • Keep all: store all samples, subject to the configured resource limits of the underlying middleware.

  • Depth

    • Queue size: only honored if the “history” policy was set to “keep last”.

  • Reliability

    • Best effort: attempt to deliver samples, but may lose them if the network is not robust.

    • Reliable: guarantee that samples are delivered, may retry multiple times.

  • Durability

    • Transient local: the publisher becomes responsible for persisting samples for “late-joining” subscriptions.

    • Volatile: no attempt is made to persist samples.

  • Deadline

    • Duration: the expected maximum amount of time between subsequent messages being published to a topic

  • Lifespan

    • Duration: the maximum amount of time between the publishing and the reception of a message without the message being considered stale or expired (expired messages are silently dropped and are effectively never received).

  • Liveliness

    • Automatic: the system will consider all of the node’s publishers to be alive for another “lease duration” when any one of its publishers has published a message.

    • Manual by topic: the system will consider the publisher to be alive for another “lease duration” if it manually asserts that it is still alive (via a call to the publisher API).

  • Lease Duration

    • Duration: the maximum period of time a publisher has to indicate that it is alive before the system considers it to have lost liveliness (losing liveliness could be an indication of a failure).

The following tables show the compatibility of the different policy settings and the result:

Compatibility of reliability QoS policies:

Publisher

Subscription

Compatible

Best effort

Best effort

Yes

Best effort

Reliable

No

Reliable

Best effort

Yes

Reliable

Reliable

Yes

Compatibility of durability QoS policies:

Publisher

Subscription

Compatible

Volatile

Volatile

Yes

Volatile

Transient local

No

Transient local

Volatile

Yes

Transient local

Transient local

Yes

Compatibility of deadline QoS policies:

Assume x and y are arbitrary valid duration values.

Publisher

Subscription

Compatible

Default

Default

Yes

Default

x

No

x

Default

Yes

x

x

Yes

x

y (where y > x)

Yes

x

y (where y < x)

No

Compatibility of liveliness QoS policies:

Publisher

Subscription

Compatible

Automatic

Automatic

Yes

Automatic

Manual by topic

No

Manual by topic

Automatic

Yes

Manual by topic

Manual by topic

Yes

Compatibility of lease duration QoS policies:

Assume x and y are arbitrary valid duration values.

Publisher

Subscription

Compatible

Default

Default

Yes

Default

x

No

x

Default

Yes

x

x

Yes

x

y (where y > x)

Yes

x

y (where y < x)

No

 
   为了建立连接,所有影响兼容性的策略都必须是兼容的。例如,即使请求和提供的QoS配置文件对具有兼容的可靠性QoS策略,但它们具有不兼容的持久性QoS策略,仍然不会建立连接。当没有建立连接时,将不会在发布者和订阅之间传递消息。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值