Basic

basic.ack(delivery-tag delivery-tag, bit multiple)
Support: full
Acknowledge one or more messages.
Acknowledge一个或多个message

When sent by the client, this method acknowledges one or more messages delivered via the Deliver or Get-Ok methods.
When sent by server, this method acknowledges one or more messages published with the Publish method on a channel in confirm mode.
The acknowledgement can be for a single message or a set of messages up to and including a specific message.
由client发出:通过Deliver或者Get-Ok  Acknowledge一个或多个message
由server发出:在confirm mode channel中通过Publish  Acknowledge一个或多个message
acknowledgement可以使用在单个message、message集合或者特殊的消息中。

basic.cancel(consumer-tag consumer-tag, no-wait no-wait) -> cancel-ok
Support: full
End a queue consumer.
删除一个queue消费者

This method cancels a consumer.
This does not affect already delivered messages, but it does mean the server will not send any more messages for that consumer.
The client may receive an arbitrary number of messages in between sending the cancel method and receiving the cancel-ok reply.
It may also be sent from the server to the client in the event of the consumer being unexpectedly cancelled
(i.e. cancelled for any reason other than the server receiving the corresponding basic.cancel from the client).
This allows clients to be notified of the loss of consumers due to events such as queue deletion.
Note that as it is not a MUST for clients to accept this method from the client,
it is advisable for the broker to be able to identify those clients that are capable of accepting the method,
through some means of capability negotiation.

该方法可以删除一个消费者
这并不会影响一个已经提交的消息,但是这意味着服务器不会再为这个consumer发送任何消息
在发送cancel之后,收到cancel-ok之前,该client可能会收到任意数量的消息
在consumer被意外cancelled时,server也会向client发送这个消息
这允许使用在减少consumer时通知client,例如删除队列
需要知道的是,这并不是一个必须的
当一个broker这是一个可选的
虽然这有时意味着capability negotiation

basic.consume(short reserved-1, queue-name queue, consumer-tag consumer-tag, no-local no-local, no-ack no-ack, bit exclusive, no-wait no-wait, table arguments) ->consume-ok
Support: partial
Start a queue consumer.
设置为consumer

This method asks the server to start a "consumer", which is a transient request for messages from a specific queue.
Consumers last as long as the channel they were declared on, or until the client cancels them.
这个方法请求服务器设置自己为consumer.
consumer的生命周期最多只能跟他声明的channel一样长,除非client进行了cancel操作。

basic.deliver(consumer-tag consumer-tag, delivery-tag delivery-tag, redelivered redelivered, exchange-name exchange, shortstr routing-key)
Support: full
Notify the client of a consumer message.
向client发送consumer message

This method delivers a message to the client, via a consumer.
In the asynchronous message delivery model, the client starts a consumer using the Consume method,
then the server responds with Deliver methods as and when messages arrive for that consumer.
这个方法通过consumer发送一条message到clinet
这是一个异步操作,client使用Consume方法创建一个consumer
当message到达,server会通过Deliver方法告诉这个consumer

basic.get(short reserved-1, queue-name queue, no-ack no-ack) -> get-ok | get-empty
Support: full
Direct access to a queue.
直接访问一个queue

This method provides a direct access to the messages in a queue using a synchronous dialogue that is designed for
specific types of application where synchronous functionality is more important than performance.
这个方法提供了一个直接访问queue中的消息,是一个同步的交互,需要进行同步操作的应用程序可以使用,不过会牺牲性能。

basic.nack(delivery-tag delivery-tag, bit multiple, bit requeue)
THIS METHOD IS A RABBITMQ-SPECIFIC EXTENSION OF AMQP
这个方法是rabbitmq对AMQP的特殊扩展
Reject one or more incoming messages.
拒绝一个或多个收到的message

This method allows a client to reject one or more incoming messages.
It can be used to interrupt and cancel large incoming messages, or return untreatable messages to their original queue.
This method is also used by the server to inform publishers on channels in confirm mode of unhandled messages.
If a publisher receives this method, it probably needs to republish the offending messages.
这个方法允许client拒绝一个或多个收到的message
可以用于中断或者取消大量的message,或者返回无法处理的消息到原来的queue中
这个方法也用于server通知confirm mode的channel 的 publisher为处理的message
如果一个publisher收到这个方法,或许需要重新投递这个message

basic.publish(short reserved-1, exchange-name exchange, shortstr routing-key, bit mandatory, bit immediate)
Support: full
Publish a message.
发送一条message

This method publishes a message to a specific exchange.
The message will be routed to queues as defined by the exchange configuration and distributed to any active consumers when the transaction, if any, is committed.
这个方法投递一个message到指定的exchange中
这条message将会被 routed到指定的queue中,而这个queue是exchange配置的。
并且会被分发到任何激活的consumer中。

basic.qos(long prefetch-size, short prefetch-count, bit global) -> qos-ok
Support: partial
Specify quality of service.
指定service的属性

This method requests a specific quality of service.
The QoS can be specified for the current channel or for all channels on the connection.
The particular properties and semantics of a qos method always depend on the content class semantics.
Though the qos method could in principle apply to both peers, it is currently meaningful only for the server.
这个方法请求一个指定的service的属性
QoS可以被指定为当前channel,或者所有连接中的channels
可以设置class semantics中的内容来指定QoS的特别属性或者semantics。
虽然qos方法原则上可以适用于所有peers,当时当前只对server有意义

basic.recover(bit requeue)
Support: full
Redeliver unacknowledged messages.
重新提交未acknowledge的message

This method asks the server to redeliver all unacknowledged messages on a specified channel.
Zero or more messages may be redelivered.
This method replaces the asynchronous Recover.
这个方法请求server重新提交指定channel中未acknowledge的message
0个或者多个message可能会被重新提交。
这个方法替代了同步的Recover

basic.recover-async(bit requeue)
Redeliver unacknowledged messages.
重新提交未acknowledge的message

This method asks the server to redeliver all unacknowledged messages on a specified channel.
Zero or more messages may be redelivered.
This method is deprecated in favour of the synchronous Recover/Recover-Ok.
这个方法请求server重新提交指定channel中未acknowledge的message
0个或者多个message可能会被重新提交。
这个方法在异步Recover/Recover-Ok被弃用。

basic.reject(delivery-tag delivery-tag, bit requeue)
Support: partial
Reject an incoming message.
拒绝收到的message

This method allows a client to reject a message.
It can be used to interrupt and cancel large incoming messages, or return untreatable messages to their original queue.
这个方法允许client拒绝一个或多个收到的message
可以用于中断或者取消大量的message,或者返回无法处理的消息到原来的queue中

RabbitMQ blog post
 
 
basic.return(reply-code reply-code, reply-text reply-text, exchange-name exchange, shortstr routing-key)
Support: full
Return a failed message.
返回一条失败的message

This method returns an undeliverable message that was published with the "immediate" flag set,
or an unroutable message published with the "mandatory" flag set.
The reply code and text provide information about the reason that the message was undeliverable.
这个方法返回一个未提交成功的message,带有"immediate"标志。
或者一个为成功rounte的message,带有"mandatory"标志。
这个reply code和text提供了message未成功提交的原因。

[译]AMQP 0-9-1 Quick Reference : basic的更多相关文章

  1. ASP.NET Web Pages (Razor) API Quick Reference

    ASP.NET Web Pages (Razor) API Quick Reference By Tom FitzMacken|February 10, 2014 Print This page co ...

  2. C++ QUICK REFERENCE

    C++ string 用法详解 字符串分割(C++)  C++ QUICK REFERENCE Matt Mahoney, mmahoney@cs.fit.edu DECLARATIONS enum ...

  3. Quick Reference Card Urls For Web Developer

    C# C# Cheatsheet & Notes Coding Guidelines for C# 3.0, 4.0, 5.0 Core C# and .NET Quick Reference ...

  4. [译]servlet3.0与non-blocking服务端推送技术

    Non-blocking(NIO)Server Push and Servlet 3 在我的前一篇文章写道如何期待成熟的使用node.js.假定有一个框架,基于该框架,开发者只需要定义协议及相关的ha ...

  5. MongoDB - The mongo Shell, mongo Shell Quick Reference

    mongo Shell Command History You can retrieve previous commands issued in the mongo shell with the up ...

  6. AMQP 0.9.1和1.0协议差别以及rabbitmq支持情况

    RabbitMQ implements AMQP 1.0 via a plugin. However, AMQP 1.0 is a completely different protocol than ...

  7. eigen quick reference

    参考: http://eigen.tuxfamily.org/dox/AsciiQuickReference.txt // A simple quickref for Eigen. Add anyth ...

  8. TensorFlow2.0提示Cannot find reference 'keras' in __init__.py

    使用TensorFlow2.0导入from tensorflow.keras import layers会出现Cannot find reference 'keras' in __init__.py提 ...

  9. Kong(V1.0.2) Clustering Reference

    介绍 Kong集群允许您通过添加更多的机器来处理更多的传入请求来水平扩展系统.它们将共享相同的配置,因为它们指向相同的数据库.指向相同数据存储的Kong节点将是相同Kong集群的一部分. 您需要在Ko ...

随机推荐

  1. 前台页面验证中需要注意的一个与VARCHAR2(N BYTE)和VARCHAR2(N CHAR)的小细节

    1:一个小的测试实例 CREATE TABLE SALES.TEST_ ( TEST_BYTE BYTE), TEST_CHAR CHAR) )--TABLE CREATED ')--1 ROW IN ...

  2. 【MySQL】mysql buffer pool结构分析

    转自:http://blog.csdn.net/wyzxg/article/details/7700394 MySQL官网配置说明地址:http://dev.mysql.com/doc/refman/ ...

  3. python os模块sys模块常用方法

    官方文档看这里 https://docs.python.org/3.5/library/os.html http://www.cnblogs.com/wupeiqi/articles/5501365. ...

  4. [Ajax] 使用Ajax异步上传图片文件(非Form表单提交)

    通过表单Form提交来上传文件的方式这里就不说了: 下面介绍,通过js中使用ajax异步上传图片文件: 新建一个html页面和一个一般处理程序即可: 涉及思路: //发送2次Ajax请求完成js异步上 ...

  5. openresty入门12 openresty php 整合

    利用 openresty 的 drizzle-nginx-module模块 读取数据 传递到  php后端 利用到  openresty 的并发,无阻塞,mysql连接池,memcache|redis ...

  6. 安装npm

    npm是nodejs官方未nodejs定制的一个工具,是Node.js的包管理器,是Node Packaged Modules的简称,通过npm可以下载安装nodejs的模块包,nodejs有很多优秀 ...

  7. Flexbox布局详解

    弹性框布局 (flexbox) 添加了级联样式表级别 2 修订版 1 (CSS2.1) 中定义的四个基本布局模式:块布局.内联布局.表格布局和定位布局.使用弹性框布局功能,你可以更加轻松地设计复杂网页 ...

  8. su:认证失败

    使用命令[su - root]切换用户,提示[su:认证失败] 原因:Ubuntu安装之后,root用户默认是被锁定的,不允许登录,也不允许su到root. 解决:重新设置密码 在终端输入命令:sud ...

  9. javaSE第二十天

    第二十天    254 1:递归(理解)    254 (1)方法定义中调用方法本身的现象    254 (2)递归的注意事项    255 (3)递归的案例:    255 A:递归求阶乘    2 ...

  10. javaSE第七天

    第七天    36 1. 成员变量和局部变量的区别(理解)    36 (1)在类中的位置不同    36 (2)在内存中的位置不同    36 (3)生命周期不同    36 (4)初始化值不同   ...