Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 90f2755

Browse files
authored
Merge pull request #175 from chibenwa/ISSUE-174
ISSUE-174 Document RPC limitations
2 parents 6314d9f + 36b952c commit 90f2755

File tree

2 files changed

+150
-1
lines changed

2 files changed

+150
-1
lines changed

src/docs/asciidoc/api-guide.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ include::{test-examples}/ApiGuideSender.java[tag=static-import]
150150
include::{test-examples}/ApiGuideSender.java[tag=resource-deletion,indent=0]
151151
-------
152152

153+
[NOTE]
154+
====
155+
Warning: These methods relies on RPCs. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
156+
is being used to prevent concurrent RPCs, making this publisher potentially blocking.
157+
====
158+
153159
==== Reliable publishing with publisher confirms
154160

155161
`Sender` offers also the `sendWithPublishConfirms` method to send

src/main/java/reactor/rabbitmq/Sender.java

Lines changed: 144 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ public RpcClient rpcClient(String exchange, String routingKey, Supplier<String>
329329
/**
330330
* Declare a queue following the specification.
331331
*
332+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
333+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
334+
*
332335
* @param specification the specification of the queue
333336
* @return a mono wrapping the result of the declaration
334337
* @see QueueSpecification
@@ -340,6 +343,9 @@ public Mono<AMQP.Queue.DeclareOk> declare(QueueSpecification specification) {
340343
/**
341344
* Declare a queue following the specification and the resource management options.
342345
*
346+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
347+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
348+
*
343349
* @param specification the specification of the queue
344350
* @param options options for resource management
345351
* @return a mono wrapping the result of the declaration
@@ -353,6 +359,9 @@ public Mono<AMQP.Queue.DeclareOk> declare(QueueSpecification specification, @Nul
353359
/**
354360
* Declare a queue following the specification.
355361
*
362+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
363+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
364+
*
356365
* @param specification the specification of the queue
357366
* @return a mono wrapping the result of the declaration
358367
* @see QueueSpecification
@@ -364,6 +373,9 @@ public Mono<AMQP.Queue.DeclareOk> declareQueue(QueueSpecification specification)
364373
/**
365374
* Declare a queue following the specification and the resource management options.
366375
*
376+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
377+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
378+
*
367379
* @param specification the specification of the queue
368380
* @param options options for resource management
369381
* @return a mono wrapping the result of the declaration
@@ -409,26 +421,62 @@ private Mono<? extends Channel> getChannelMonoForResourceManagement(ResourceMana
409421
options.getChannelMono() : this.resourceManagementChannelMono;
410422
}
411423

424+
/**
425+
* Delete a queue.
426+
*
427+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
428+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
429+
*/
412430
public Mono<AMQP.Queue.DeleteOk> delete(QueueSpecification specification) {
413431
return this.delete(specification, false, false);
414432
}
415433

434+
/**
435+
* Delete a queue.
436+
*
437+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
438+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
439+
*/
416440
public Mono<AMQP.Queue.DeleteOk> delete(QueueSpecification specification, @Nullable ResourceManagementOptions options) {
417441
return this.delete(specification, false, false, options);
418442
}
419443

444+
/**
445+
* Delete a queue.
446+
*
447+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
448+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
449+
*/
420450
public Mono<AMQP.Queue.DeleteOk> delete(QueueSpecification specification, boolean ifUnused, boolean ifEmpty) {
421451
return this.deleteQueue(specification, ifUnused, ifEmpty);
422452
}
423453

454+
/**
455+
* Delete a queue.
456+
*
457+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
458+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
459+
*/
424460
public Mono<AMQP.Queue.DeleteOk> delete(QueueSpecification specification, boolean ifUnused, boolean ifEmpty, @Nullable ResourceManagementOptions options) {
425461
return this.deleteQueue(specification, ifUnused, ifEmpty, options);
426462
}
427463

464+
/**
465+
* Delete a queue.
466+
*
467+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
468+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
469+
*/
428470
public Mono<AMQP.Queue.DeleteOk> deleteQueue(QueueSpecification specification, boolean ifUnused, boolean ifEmpty) {
429471
return this.deleteQueue(specification, ifUnused, ifEmpty, null);
430472
}
431473

474+
/**
475+
* Delete a queue.
476+
*
477+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
478+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
479+
*/
432480
public Mono<AMQP.Queue.DeleteOk> deleteQueue(QueueSpecification specification, boolean ifUnused, boolean ifEmpty, @Nullable ResourceManagementOptions options) {
433481
Mono<? extends Channel> channelMono = getChannelMonoForResourceManagement(options);
434482
AMQP.Queue.Delete delete = new AMQImpl.Queue.Delete.Builder()
@@ -448,18 +496,41 @@ public Mono<AMQP.Queue.DeleteOk> deleteQueue(QueueSpecification specification, b
448496
.publishOn(resourceManagementScheduler);
449497
}
450498

499+
/**
500+
* Declare an exchange.
501+
*
502+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
503+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
504+
*/
451505
public Mono<AMQP.Exchange.DeclareOk> declare(ExchangeSpecification specification) {
452506
return this.declareExchange(specification, null);
453507
}
454508

509+
/**
510+
* Declare an exchange.
511+
*
512+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
513+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
514+
*/
455515
public Mono<AMQP.Exchange.DeclareOk> declare(ExchangeSpecification specification, @Nullable ResourceManagementOptions options) {
456516
return this.declareExchange(specification, options);
457517
}
458-
518+
/**
519+
* Declare an exchange.
520+
*
521+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
522+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
523+
*/
459524
public Mono<AMQP.Exchange.DeclareOk> declareExchange(ExchangeSpecification specification) {
460525
return this.declareExchange(specification, null);
461526
}
462527

528+
/**
529+
* Declare an exchange.
530+
*
531+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
532+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
533+
*/
463534
public Mono<AMQP.Exchange.DeclareOk> declareExchange(ExchangeSpecification specification, @Nullable ResourceManagementOptions options) {
464535
Mono<? extends Channel> channelMono = getChannelMonoForResourceManagement(options);
465536
AMQP.Exchange.Declare declare = new AMQImpl.Exchange.Declare.Builder()
@@ -482,26 +553,62 @@ public Mono<AMQP.Exchange.DeclareOk> declareExchange(ExchangeSpecification speci
482553
.publishOn(resourceManagementScheduler);
483554
}
484555

556+
/**
557+
* Delete an exchange.
558+
*
559+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
560+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
561+
*/
485562
public Mono<AMQP.Exchange.DeleteOk> delete(ExchangeSpecification specification) {
486563
return this.delete(specification, false);
487564
}
488565

566+
/**
567+
* Delete an exchange.
568+
*
569+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
570+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
571+
*/
489572
public Mono<AMQP.Exchange.DeleteOk> delete(ExchangeSpecification specification, @Nullable ResourceManagementOptions options) {
490573
return this.delete(specification, false, options);
491574
}
492575

576+
/**
577+
* Delete an exchange.
578+
*
579+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
580+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
581+
*/
493582
public Mono<AMQP.Exchange.DeleteOk> delete(ExchangeSpecification specification, boolean ifUnused) {
494583
return this.deleteExchange(specification, ifUnused);
495584
}
496585

586+
/**
587+
* Delete an exchange.
588+
*
589+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
590+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
591+
*/
497592
public Mono<AMQP.Exchange.DeleteOk> delete(ExchangeSpecification specification, boolean ifUnused, @Nullable ResourceManagementOptions options) {
498593
return this.deleteExchange(specification, ifUnused, options);
499594
}
500595

596+
/**
597+
* Delete an exchange.
598+
*
599+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
600+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
601+
*/
501602
public Mono<AMQP.Exchange.DeleteOk> deleteExchange(ExchangeSpecification specification, boolean ifUnused) {
502603
return this.deleteExchange(specification, ifUnused, null);
503604
}
504605

606+
/**
607+
* Delete an exchange.
608+
*
609+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
610+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
611+
*/
505612
public Mono<AMQP.Exchange.DeleteOk> deleteExchange(ExchangeSpecification specification, boolean ifUnused, @Nullable ResourceManagementOptions options) {
506613
Mono<? extends Channel> channelMono = getChannelMonoForResourceManagement(options);
507614
AMQP.Exchange.Delete delete = new AMQImpl.Exchange.Delete.Builder()
@@ -524,6 +631,9 @@ public Mono<AMQP.Exchange.DeleteOk> deleteExchange(ExchangeSpecification specifi
524631
* <p>
525632
* Alias of {@link #unbind(BindingSpecification)}.
526633
*
634+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
635+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
636+
*
527637
* @param specification the unbinding specification
528638
* @return the result of the operation
529639
* @since 1.4.1
@@ -537,6 +647,9 @@ public Mono<AMQP.Queue.UnbindOk> unbindQueue(BindingSpecification specification)
537647
* <p>
538648
* Alias of {@link #unbind(BindingSpecification, ResourceManagementOptions)}.
539649
*
650+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
651+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
652+
*
540653
* @param specification the unbinding specification
541654
* @param options options to control the operation, e.g. channel to use
542655
* @return the result of the operation
@@ -551,6 +664,9 @@ public Mono<AMQP.Queue.UnbindOk> unbindQueue(BindingSpecification specification,
551664
* <p>
552665
* Alias of {@link #unbindQueue(BindingSpecification)}.
553666
*
667+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
668+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
669+
*
554670
* @param specification the unbinding specification
555671
* @return the result of the operation
556672
*/
@@ -563,6 +679,9 @@ public Mono<AMQP.Queue.UnbindOk> unbind(BindingSpecification specification) {
563679
* <p>
564680
* Alias of {@link #unbindQueue(BindingSpecification, ResourceManagementOptions)}.
565681
*
682+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
683+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
684+
*
566685
* @param specification the unbinding specification
567686
* @param options options to control the operation, e.g. channel to use
568687
* @return the result of the operation
@@ -590,6 +709,9 @@ public Mono<AMQP.Queue.UnbindOk> unbind(BindingSpecification specification, @Nul
590709
/**
591710
* Unbind an exchange from another exchange.
592711
*
712+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
713+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
714+
*
593715
* @param specification the unbinding specification
594716
* @return the result of the operation
595717
* @since 1.4.1
@@ -601,6 +723,9 @@ public Mono<AMQP.Exchange.UnbindOk> unbindExchange(BindingSpecification specific
601723
/**
602724
* Unbind an exchange from another exchange.
603725
*
726+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
727+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
728+
*
604729
* @param specification the unbinding specification
605730
* @param options options to control the operation, e.g. channel to use
606731
* @return the result of the operation
@@ -631,6 +756,9 @@ public Mono<AMQP.Exchange.UnbindOk> unbindExchange(BindingSpecification specific
631756
* <p>
632757
* Alias of {@link #bind(BindingSpecification)}
633758
*
759+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
760+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
761+
*
634762
* @param specification the binding specification
635763
* @return the result of the operation
636764
* @since 1.4.1
@@ -644,6 +772,9 @@ public Mono<AMQP.Queue.BindOk> bindQueue(BindingSpecification specification) {
644772
* <p>
645773
* Alias of {@link #bind(BindingSpecification, ResourceManagementOptions)}
646774
*
775+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
776+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
777+
*
647778
* @param specification the binding specification
648779
* @param options options to control the operation, e.g. channel to use
649780
* @return the result of the operation
@@ -658,6 +789,9 @@ public Mono<AMQP.Queue.BindOk> bindQueue(BindingSpecification specification, @Nu
658789
* <p>
659790
* Alias of {@link #bindQueue(BindingSpecification)}
660791
*
792+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
793+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
794+
*
661795
* @param specification the binding specification
662796
* @return the result of the operation
663797
* @since 1.4.1
@@ -671,6 +805,9 @@ public Mono<AMQP.Queue.BindOk> bind(BindingSpecification specification) {
671805
* <p>
672806
* Alias of {@link #bindQueue(BindingSpecification, ResourceManagementOptions)}
673807
*
808+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
809+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
810+
*
674811
* @param specification the binding specification
675812
* @param options options to control the operation, e.g. channel to use
676813
* @return the result of the operation
@@ -700,6 +837,9 @@ public Mono<AMQP.Queue.BindOk> bind(BindingSpecification specification, @Nullabl
700837
/**
701838
* Bind an exchange to another exchange.
702839
*
840+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
841+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
842+
*
703843
* @param specification the binding specification
704844
* @return the result of the operation
705845
* @since 1.4.1
@@ -711,6 +851,9 @@ public Mono<AMQP.Exchange.BindOk> bindExchange(BindingSpecification specificatio
711851
/**
712852
* Bind an exchange to another exchange.
713853
*
854+
* Warning: This method relies on RPC. As AMQP 0.9.1 protocol does not use a correlation ID for requests, a lock
855+
* is being used to prevent concurrent RPCs, making this publisher potentially blocking.
856+
*
714857
* @param specification the binding specification
715858
* @param options options to control the operation, e.g. channel to use
716859
* @return the result of the operation

0 commit comments

Comments
 (0)