AMQP_1.0_PR2学习笔记

Message

bare message:发送端发送的消息。

annotated message:接收端接收的消息。

A Node is a named source and/or sink of Messages

Links may be “destructive”, or “non-destructive”.

Links may have entry criteria (Filters)。

Duplicate deliveries should be discarded.

If the node at either end of the link is deleted, so is the link itself.

 

Credit

A link with no credit is impassable.

Sending a message irrevocably consumes the credit.

Receivers of messages can add or remove multiple units of credit at any time.

Credit is used to ensure that nodes do not receive more messages than they can physically store.

 

Containers

Nodes within the AMQP network exist within Containers.

A container is a physical or logical process to which network connections can be established.

 

Sessions

A Session is a named interaction between two containers providing for a pair of reliable ordered command streams (one in each direction).

 

Containers and Sessions form an underlay network, nodes and links an overlay network atop them.

 

Commands

 

Sessions are a transport for commands.

Commands are the atomic units of work of the AMQP transport protocol.

Commands are used to create links between nodes in the source and destination containers, to transfer message data, and to issue and revoke credit.

Should a command fail for some reason, then the sender of the command will be notified as to the last successfully executed command.

No command after the failed command will be executed.

 

Transactions

The AMQP specification defines a transactional container as one that is capable of performing addition/removal of multiple messages to/from nodes in a single atomic action.

In any given session, at most one peer may act as the transactional container. The other peer is the transaction controller.

The transaction mode is controlled at the session level, set at the time of session creation, and cannot thereafter be modified.

Container, controller. coordinator

Only the addition/removal of messages to/from nodes are affected by transactions, other state changes such as the creation or deletion of links, and the issuance of credit, are not.

转载于:https://www.cnblogs.com/shuaifeng/archive/2010/04/09/1707929.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
amqp_basic_qos是AMQP(Advanced Message Queuing Protocol,高级消息队列协议)的一个方法,它用于在消费者和消息代理(broker)之间设置消息传输的质量保证。 在消息队列中,消费者可以以不同的速率接收消息。如果消费者的处理能力不足,消息可能会积压在队列中,导致系统性能降低或者消息丢失。为了解决这个问题,amqp_basic_qos方法被引入。 amqp_basic_qos方法的作用是告诉消息代理,消费者希望以怎样的速率接收消息。它接收三个参数:prefetch_size、prefetch_count和global。 prefetch_size表示消息大小的预获取限制,如果设置为0,则表示没有大小的限制。 prefetch_count表示消息数量的预获取限制,它指定了消费者可以预先获取的最大消息数量。例如,设置为1表示每次只获取一条消息。 global表示指定是否将预获取限制应用于整个连接,如果设置为false,则表示只对当前消费者进行限制。 通过使用amqp_basic_qos方法,消费者可以根据自身的处理能力和系统负载情况来控制消息接收的速率,避免消息积压和系统过载的问题。同时,amqp_basic_qos方法的使用还可以提高消息处理的效率和质量,保证系统的稳定性。 总之,amqp_basic_qos是AMQP协议中用于设置消息传输质量保证的方法。通过它,消费者可以设置自身获取消息的速率,避免因为消息积压导致的系统性能下降或者消息丢失的问题。同时,amqp_basic_qos方法的使用还可以提高消息处理的效率和质量,保证系统的稳定性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值