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. AX在query中添加自己的函数

    在自己新建的Query中,想添加自己提供的函数,我们可以在系统的标准类SysQueryRangeUtil中添加自己写的函数 然后在Query的Range中按照格式(method())进行调用

  2. spring HibernateValidator 验证 子类不起作用

    spring HibernateValidator 验证 子类不起作用,在要验证的子类前加上@Valid即可. public class UserInfo { private int Id; @Val ...

  3. oracle表中某个字段含有字符回车、空格的手动修改方式

    select t.*, t.rowid from TB_SD_STANDARD_CHOOSE_ADVISE t where t.id =323900000 update TB_SD_STANDARD_ ...

  4. Windows API学习---线程与内核对象的同步

    前言 若干种内核对象,包括进程,线程和作业.可以将所有这些内核对象用于同步目的.对于线程同步来说,这些内核对象中的每种对象都可以说是处于已通知或未通知的状态之中.这种状态的切换是由Microsoft为 ...

  5. 智能指针(三):unique_ptr使用简介

    我们知道auto_ptr通过复制构造或者通过=赋值后,原来的auto_ptr对象就报废了.所有权转移到新的对象中去了.而通过shared_ptr可以让多个智能指针对象同时拥有某一块内存的访问权.但假如 ...

  6. sed的惯常用法

    1:注释掉某一行这个经常会遇到的,把配置文件里某一行注释掉.让他不起作用.sed -i -e ’121 s/^/#/’ /usr/local/apache2/conf/httpd.conf上面一行命令 ...

  7. DirectDraw打造极速图形引擎(Alpha混合)

    显然DirectDraw是Windows下写2D图形程序的最好选择,虽然Direct3D也可以写,但是没DirectDraw简单方便,特别对于初学者,一来就接触那么多函数和参数总不是件愉快的事,所以我 ...

  8. dwz简单配置与操作

    1.首先将dwz的文件放到你的项目中(http://yunpan.cn/QbTH4kN6UXX9B) 2.在页面中将前台数据复制到页面中,将js,css等路径配置好 3.这个地方一定要配置好,xml文 ...

  9. 【项目相关】MVC中将WebUploader进行封装

    昨天初步将webuploader用在了项目中,但紧接着就发现了一个问题,每一个页面都需要写那么多初始化webUploader的代码,这样肯定是我不能接受的,于是花了半天时间对该控件进行了封装. 最后, ...

  10. [译]MongoDB 3.0发布说明

    原文来自:http://docs.mongodb.org/manual/release-notes/3.0/ 2015年3月3日 MongoDB 3.0现已可供使用.关键新特性包括支持WiredTig ...