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. EXE中释放文件

    今天有个朋友问到VC能否释放多个EXE.DLL或WAV等文件,我便做了个实例给他. (注意:以下释放资源代码是不受文件扩展名所限制的,你可以释放更多类型文件) 下面是我写了个很方面的函数给大家用! 1 ...

  2. java 中的fanal

    三.java中有final final 修饰符 关键字可用于修饰类,变量和方法,final关键字有点类似于C#里的sealed 关键字,用于表示它修饰的类,方法和变量不可改变. fina修饰变量时,表 ...

  3. sql server查询出的结果中添加一列序列行

    select row_number()over(order by id) as rownum ,[UserName] ,[Password] ,[Mobile] ,[Email] ,[Sex] ,[C ...

  4. GET POST 区别详解

    Get是用来从服务器上获得数据,而Post是用来向服务器上传递数据. 2. Get将表单中数据的按照variable=value的形式,添加到action所指向的URL后面,并且两者使用“?”连接,而 ...

  5. Android IOS WebRTC 音视频开发总结(五八)-- 图文解说视频直播原理

    本文主要介绍rtmp&hls视频直播原理,文章最早发表在我们的微信公众号上,详见这里,欢迎关注微信公众号blackerteam,更多详见www.blackerteam.com 现在视频直播很火 ...

  6. javaSE第十八天

    第十八天    192 1:Map(掌握)    192 (1)定义:    192 (2)Map和Collection的区别?    192 (3)Map接口功能概述(自己补齐)    192 A: ...

  7. UIButton设置imgae图片自适应button的大小且不变形

    在某些情况下,我们使用的UIButton的背景图片不一定就是标准的尺寸,有时会偏大,那么怎么办? 这个比较简单直接设置 :    self.imageView.contentMode = UIView ...

  8. PHP版实现友好的时间显示方式(例如:2小时前)

    完整php类,通常我会配合smary使用,快捷使用 (plugins/function.rdate.php),更多php技术开发就去php教程网,http://php.662p.com <?PH ...

  9. eclipse自动补全

    最简单的修改方式是:Windows——>Preferences——>Java-->Editor-->Content Asist,在Auto activation trigger ...

  10. 在VMware中安装RHEL6.2(下)—— RHEL系统安装

    一. 打开安装好的虚拟机,因为上一篇我们未设置任何RHEL的安装源,所以它会如下图提示: 二. 图上标识为两种更改光盘设置的方法,物理或虚拟光盘皆可. 1. 选择①: 2. 选择②,点击设置...: ...