Skip to content

Commit ecbc388

Browse files
committed
GH-1116: LQCF Doc Polishing
Resolves #1116
1 parent 7859491 commit ecbc388

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/reference/asciidoc/amqp.adoc

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -644,17 +644,13 @@ CAUTION: This connection factory is intended for long-lived connections, such as
644644
It is not intended for short connection use, such as with a `RabbitTemplate` because of the overhead of invoking the REST API before making the connection.
645645
Also, for publish operations, the queue is unknown, and the message is published to all cluster members anyway, so the logic of looking up the node has little value.
646646

647-
The following example configuration shows how to use Spring Boot's RabbitProperties to configure the factories:
647+
The following example configuration shows how to configure the factories:
648648

649649
====
650650
[source, java]
651651
----
652652
@Autowired
653-
private RabbitProperties props;
654-
655-
private final String[] adminUris = { "http://host1:15672", "http://host2:15672" };
656-
657-
private final String[] nodes = { "rabbit@host1", "rabbit@host2" };
653+
private ConfigurationProperties props;
658654
659655
@Bean
660656
public ConnectionFactory defaultConnectionFactory() {
@@ -671,16 +667,17 @@ public ConnectionFactory queueAffinityCF(
671667
@Qualifier("defaultConnectionFactory") ConnectionFactory defaultCF) {
672668
return new LocalizedQueueConnectionFactory(defaultCF,
673669
StringUtils.commaDelimitedListToStringArray(this.props.getAddresses()),
674-
this.adminUris, this.nodes,
670+
StringUtils.commaDelimitedListToStringArray(this.props.getAdminUris()),
671+
StringUtils.commaDelimitedListToStringArray(this.props.getNodes()),
675672
this.props.getVirtualHost(), this.props.getUsername(), this.props.getPassword(),
676673
false, null);
677674
}
678675
----
679676
====
680677

681678
Notice that the first three parameters are arrays of `addresses`, `adminUris`, and `nodes`.
682-
These are positional in that, when a container attempts to connect to a queue, it determines on which node the queue is
683-
mastered and connects to the address in the same array position.
679+
These are positional in that, when a container attempts to connect to a queue, it uses the admin API to determine on which node the queue is
680+
mastered and connects to the address in the same array position as that node.
684681

685682
[[cf-pub-conf-ret]]
686683
===== Publisher Confirms and Returns

0 commit comments

Comments
 (0)