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. Linux下搭建Lotus Domino集群

    Linux下搭建Lotus Domino 集群 本文内容是Linux平台下Lotus Domino服务器部署案例(http://chenguang.blog.51cto.com/350944/1334 ...

  2. Sass基础语法

    Sass是CSS3语言的扩展,在CSS的基础之上添加了新特性和语法,能省事地写出更好的样式表.Sass引擎是基于Ruby的. 导入Sass文件: @import "colors" ...

  3. jQ复制按钮的插件zclip

    zclip官网:http://www.steamdev.com/zclip/ swf文件国内下载:ZeroClipboard.swf jQuery-zclip是一个复制内容到剪贴板的jQuery插件, ...

  4. 深入了解Qt(三)之元signal和slot

    深入了解Qt主要内容来源于Inside Qt系列,本文做了部分删改,以便于理解.在此向原作者表示感谢! 在Qt 信号和槽函数这篇文章中已经详细地介绍了信号和槽的使用及注意事项.在这里对其使用方面的知识 ...

  5. JS常用的设计模式(10)——模版方法模式

    模式方法是预先定义一组算法,先把算法的不变部分抽象到父类,再将另外一些可变的步骤延迟到子类去实现.听起来有点像工厂模式( 非前面说过的简单工厂模式 ). 最大的区别是,工厂模式的意图是根据子类的实现最 ...

  6. kafka概念

    一.结构与概念解释 1.基础概念 topics: kafka通过topics维护各类信息. producer:发布消息到Kafka topic的进程. consumer:订阅kafka topic进程 ...

  7. HTTP协议概述

    虽然cURL支持多种协议,但日常我们最常用的还是HTTP协议,下文中着重介绍HTTP的相关使用方法,因此我们要对HTTP协议有所了解. HTTP,超文本传送协议,通过因特网传送万维网文档的数据传送协议 ...

  8. IP配置

    1: #vi /etc/sysconfig/network-scripts/ifcfg-eth0 2: 实验环境-网络设置 公司域网: IP=162.168.16.0/24 netmask=255.2 ...

  9. [视频]物联网应用-ARM mbed-来至MultiTech Systems的解决方案

    ARM公司面向物联网及可穿戴市场,近期可谓是动作频频,先是发布了专为物联网及可穿戴领域而生的Cortex-M7架构,接着又发布了mbed物联网操作系统.意图在物联网领域构筑一套坚不可摧的生态系统. 这 ...

  10. jQuery中$.ajax()和$.getJson()同步处理详解

    一.前言 为什么需要用到同步,因为有时候我们给一个提交按钮注册提交表单数据的时候,在提交动作之前会进行一系列的异步ajax请求操作,但是页面js代码会按顺序从上往下面执行,如果你在这过程中进行了异步操 ...