Skip to content

Commit 9bb9fec

Browse files
author
Michael Bridgen
committed
Change the name and JavaDoc for the noAck parameter in many methods in the channel API. This doesn't affect auto-generated code;
I'm making this a difference between the protocol and our interface to it.
1 parent c062a6c commit 9bb9fec

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

src/com/rabbitmq/client/Channel.java

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ public interface Channel extends ShutdownNotifier {
185185
* Request specific "quality of service" settings.
186186
*
187187
* These settings impose limits on the amount of data the server
188-
* will deliver to consumers before requiring the receipt of
189-
* acknowledgements.
188+
* will deliver to consumers before requiring acknowledgements.
190189
* Thus they provide a means of consumer-initiated flow control.
191190
* @see com.rabbitmq.client.AMQP.Basic.Qos
192191
* @param prefetchSize maximum amount of content (measured in
@@ -428,11 +427,13 @@ Queue.DeclareOk queueDeclare(String queue, boolean durable, boolean exclusive, b
428427
* @see com.rabbitmq.client.AMQP.Basic.GetOk
429428
* @see com.rabbitmq.client.AMQP.Basic.GetEmpty
430429
* @param queue the name of the queue
431-
* @param noAck true if no handshake is required
430+
* @param autoAck true if the server should consider messages
431+
* acknowledged once delivered; false if the server should expect
432+
* explicit acknowledgements
432433
* @return a {@link GetResponse} containing the retrieved message data
433434
* @throws java.io.IOException if an error is encountered
434435
*/
435-
GetResponse basicGet(String queue, boolean noAck) throws IOException;
436+
GetResponse basicGet(String queue, boolean autoAck) throws IOException;
436437

437438
/**
438439
* Acknowledge one or several received
@@ -441,7 +442,9 @@ Queue.DeclareOk queueDeclare(String queue, boolean durable, boolean exclusive, b
441442
* containing the received message being acknowledged.
442443
* @see com.rabbitmq.client.AMQP.Basic.Ack
443444
* @param deliveryTag the tag from the received {@link com.rabbitmq.client.AMQP.Basic.GetOk} or {@link com.rabbitmq.client.AMQP.Basic.Deliver}
444-
* @param multiple true if we are acknowledging multiple messages with the same delivery tag
445+
* @param multiple true to acknowledge all messages up to and
446+
* including the supplied delivery tag; false to acknowledge just
447+
* the supplied delivery tag.
445448
* @throws java.io.IOException if an error is encountered
446449
*/
447450
void basicAck(long deliveryTag, boolean multiple) throws IOException;
@@ -459,7 +462,7 @@ Queue.DeclareOk queueDeclare(String queue, boolean durable, boolean exclusive, b
459462

460463
/**
461464
* Start a non-nolocal, non-exclusive consumer, with
462-
* explicit acknowledgements required and a server-generated consumerTag.
465+
* explicit acknowledgement and a server-generated consumerTag.
463466
* @param queue the name of the queue
464467
* @param callback an interface to the consumer object
465468
* @return the consumerTag generated by the server
@@ -475,20 +478,24 @@ Queue.DeclareOk queueDeclare(String queue, boolean durable, boolean exclusive, b
475478
* Start a non-nolocal, non-exclusive consumer, with
476479
* a server-generated consumerTag.
477480
* @param queue the name of the queue
478-
* @param noAck true if no handshake is required
481+
* @param autoAck true if the server should consider messages
482+
* acknowledged once delivered; false if the server should expect
483+
* explicit acknowledgements
479484
* @param callback an interface to the consumer object
480485
* @return the consumerTag generated by the server
481486
* @throws java.io.IOException if an error is encountered
482487
* @see com.rabbitmq.client.AMQP.Basic.Consume
483488
* @see com.rabbitmq.client.AMQP.Basic.ConsumeOk
484489
* @see #basicConsume(String,boolean, String,boolean,boolean, Map, Consumer)
485490
*/
486-
String basicConsume(String queue, boolean noAck, Consumer callback) throws IOException;
491+
String basicConsume(String queue, boolean autoAck, Consumer callback) throws IOException;
487492

488493
/**
489494
* Start a non-nolocal, non-exclusive consumer.
490495
* @param queue the name of the queue
491-
* @param noAck true if no handshake is required
496+
* @param autoAck true if the server should consider messages
497+
* acknowledged once delivered; false if the server should expect
498+
* explicit acknowledgements
492499
* @param consumerTag a client-generated consumer tag to establish context
493500
* @param callback an interface to the consumer object
494501
* @return the consumerTag associated with the new consumer
@@ -497,13 +504,15 @@ Queue.DeclareOk queueDeclare(String queue, boolean durable, boolean exclusive, b
497504
* @see com.rabbitmq.client.AMQP.Basic.ConsumeOk
498505
* @see #basicConsume(String,boolean, String,boolean,boolean, Map, Consumer)
499506
*/
500-
String basicConsume(String queue, boolean noAck, String consumerTag, Consumer callback) throws IOException;
507+
String basicConsume(String queue, boolean autoAck, String consumerTag, Consumer callback) throws IOException;
501508

502509
/**
503510
* Start a consumer. Calls the consumer's {@link Consumer#handleConsumeOk}
504511
* method before returning.
505512
* @param queue the name of the queue
506-
* @param noAck true if no handshake is required
513+
* @param autoAck true if the server should consider messages
514+
* acknowledged once delivered; false if the server should expect
515+
* explicit acknowledgements
507516
* @param consumerTag a client-generated consumer tag to establish context
508517
* @param noLocal flag set to true unless server local buffering is required
509518
* @param exclusive true if this is an exclusive consumer
@@ -514,7 +523,7 @@ Queue.DeclareOk queueDeclare(String queue, boolean durable, boolean exclusive, b
514523
* @see com.rabbitmq.client.AMQP.Basic.Consume
515524
* @see com.rabbitmq.client.AMQP.Basic.ConsumeOk
516525
*/
517-
String basicConsume(String queue, boolean noAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String, Object> arguments, Consumer callback) throws IOException;
526+
String basicConsume(String queue, boolean autoAck, String consumerTag, boolean noLocal, boolean exclusive, Map<String, Object> arguments, Consumer callback) throws IOException;
518527

519528
/**
520529
* Cancel a consumer. Calls the consumer's {@link Consumer#handleCancelOk}

src/com/rabbitmq/client/impl/ChannelN.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -609,10 +609,10 @@ public Queue.UnbindOk queueUnbind(String queue, String exchange, String routingK
609609
}
610610

611611
/** Public API - {@inheritDoc} */
612-
public GetResponse basicGet(String queue, boolean noAck)
612+
public GetResponse basicGet(String queue, boolean autoAck)
613613
throws IOException
614614
{
615-
AMQCommand replyCommand = exnWrappingRpc(new Basic.Get(TICKET, queue, noAck));
615+
AMQCommand replyCommand = exnWrappingRpc(new Basic.Get(TICKET, queue, autoAck));
616616
Method method = replyCommand.getMethod();
617617

618618
if (method instanceof Basic.GetOk) {
@@ -654,22 +654,22 @@ public String basicConsume(String queue, Consumer callback)
654654
}
655655

656656
/** Public API - {@inheritDoc} */
657-
public String basicConsume(String queue, boolean noAck, Consumer callback)
657+
public String basicConsume(String queue, boolean autoAck, Consumer callback)
658658
throws IOException
659659
{
660-
return basicConsume(queue, noAck, "", callback);
660+
return basicConsume(queue, autoAck, "", callback);
661661
}
662662

663663
/** Public API - {@inheritDoc} */
664-
public String basicConsume(String queue, boolean noAck, String consumerTag,
664+
public String basicConsume(String queue, boolean autoAck, String consumerTag,
665665
Consumer callback)
666666
throws IOException
667667
{
668-
return basicConsume(queue, noAck, consumerTag, false, false, null, callback);
668+
return basicConsume(queue, autoAck, consumerTag, false, false, null, callback);
669669
}
670670

671671
/** Public API - {@inheritDoc} */
672-
public String basicConsume(String queue, boolean noAck, String consumerTag,
672+
public String basicConsume(String queue, boolean autoAck, String consumerTag,
673673
boolean noLocal, boolean exclusive, Map<String, Object> arguments,
674674
final Consumer callback)
675675
throws IOException
@@ -694,7 +694,7 @@ public String transformReply(AMQCommand replyCommand) {
694694
};
695695

696696
rpc(new Basic.Consume(TICKET, queue, consumerTag,
697-
noLocal, noAck, exclusive,
697+
noLocal, autoAck, exclusive,
698698
false, arguments),
699699
k);
700700

0 commit comments

Comments
 (0)