From 7a90c3379d9846a46fce6656d3706541f5879b73 Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Sat, 14 Sep 2024 21:19:42 +0700 Subject: [PATCH] docs: update --- src/reference/antora/antora.yml | 13 ++++++++++++- .../ROOT/pages/amqp/broker-configuration.adoc | 2 +- .../antora/modules/ROOT/pages/amqp/connections.adoc | 2 +- .../modules/ROOT/pages/amqp/listener-queues.adoc | 2 +- .../ROOT/pages/amqp/management-rest-api.adoc | 2 +- .../modules/ROOT/pages/amqp/message-converters.adoc | 2 +- .../async-annotation-driven/enable.adoc | 2 +- .../receiving-messages/micrometer-observation.adoc | 2 +- .../pages/amqp/receiving-messages/micrometer.adoc | 2 +- .../modules/ROOT/pages/amqp/request-reply.adoc | 4 ++-- ...-recovering-from-errors-and-broker-failures.adoc | 2 +- .../modules/ROOT/pages/amqp/sending-messages.adoc | 2 +- .../modules/ROOT/pages/amqp/transactions.adoc | 8 ++++---- .../antora/modules/ROOT/pages/appendix/native.adoc | 2 +- .../changes-in-1-3-since-1-2.adoc | 13 ++++++------- .../changes-in-1-4-since-1-3.adoc | 8 ++++---- .../changes-in-1-5-since-1-4.adoc | 6 +++--- .../changes-in-1-6-since-1-5.adoc | 4 ++-- .../changes-in-1-7-since-1-6.adoc | 2 +- .../changes-in-2-0-since-1-7.adoc | 4 ++-- .../changes-in-2-1-since-2-0.adoc | 2 +- .../changes-to-1-2-since-1-1.adoc | 2 +- .../modules/ROOT/pages/integration-reference.adoc | 2 +- .../antora/modules/ROOT/pages/logging.adoc | 2 +- .../antora/modules/ROOT/pages/sample-apps.adoc | 6 +++--- src/reference/antora/modules/ROOT/pages/stream.adoc | 8 ++++---- 26 files changed, 58 insertions(+), 48 deletions(-) diff --git a/src/reference/antora/antora.yml b/src/reference/antora/antora.yml index fc3041c337..f3ceb248f4 100644 --- a/src/reference/antora/antora.yml +++ b/src/reference/antora/antora.yml @@ -14,4 +14,15 @@ ext: asciidoc: attributes: attribute-missing: 'warn' - chomp: 'all' \ No newline at end of file + chomp: 'all' + spring-docs: 'https://docs.spring.io' + spring-framework-docs: '{spring-docs}/spring-framework/reference' + spring-integration-docs: '{spring-docs}/spring-integration/reference' + spring-amqp-java-docs: '{spring-docs}/spring-amqp/docs/current/api/org/springframework/amqp' + spring-framework-java-docs: '{spring-docs}/spring/docs/current/javadoc-api/org/springframework' + spring-retry-java-docs: '{spring-docs}/spring-retry/docs/api/current/' + # External projects URLs and related attributes + micrometer-docs: 'https://docs.micrometer.io' + micrometer-tracing-docs: '{micrometer-docs}/tracing/reference/' + micrometer-micrometer-docs: '{micrometer-docs}/micrometer/reference/' + rabbitmq-stream-docs: 'https://rabbitmq.github.io/rabbitmq-stream-java-client/stable/htmlsingle' \ No newline at end of file diff --git a/src/reference/antora/modules/ROOT/pages/amqp/broker-configuration.adoc b/src/reference/antora/modules/ROOT/pages/amqp/broker-configuration.adoc index c983716a37..1dbf6ac314 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/broker-configuration.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/broker-configuration.adoc @@ -359,7 +359,7 @@ public Exchange exchange() { } ---- -See the Javadoc for https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp/core/QueueBuilder.html[`org.springframework.amqp.core.QueueBuilder`] and https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp/core/ExchangeBuilder.html[`org.springframework.amqp.core.ExchangeBuilder`] for more information. +See the Javadoc for {spring-amqp-java-docs}/core/QueueBuilder.html[`org.springframework.amqp.core.QueueBuilder`] and {spring-amqp-java-docs}/core/ExchangeBuilder.html[`org.springframework.amqp.core.ExchangeBuilder`] for more information. Starting with version 2.0, the `ExchangeBuilder` now creates durable exchanges by default, to be consistent with the simple constructors on the individual `AbstractExchange` classes. To make a non-durable exchange with the builder, use `.durable(false)` before invoking `.build()`. diff --git a/src/reference/antora/modules/ROOT/pages/amqp/connections.adoc b/src/reference/antora/modules/ROOT/pages/amqp/connections.adoc index 42a4b0a199..da8bf568b8 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/connections.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/connections.adoc @@ -483,7 +483,7 @@ public class MyService { ---- It is important to unbind the resource after use. -For more information, see the https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp/rabbit/connection/AbstractRoutingConnectionFactory.html[JavaDoc] for `AbstractRoutingConnectionFactory`. +For more information, see the {spring-amqp-java-docs}/rabbit/connection/AbstractRoutingConnectionFactory.html[JavaDoc] for `AbstractRoutingConnectionFactory`. Starting with version 1.4, `RabbitTemplate` supports the SpEL `sendConnectionFactorySelectorExpression` and `receiveConnectionFactorySelectorExpression` properties, which are evaluated on each AMQP protocol interaction operation (`send`, `sendAndReceive`, `receive`, or `receiveAndReply`), resolving to a `lookupKey` value for the provided `AbstractRoutingConnectionFactory`. You can use bean references, such as `@vHostResolver.getVHost(#root)` in the expression. diff --git a/src/reference/antora/modules/ROOT/pages/amqp/listener-queues.adoc b/src/reference/antora/modules/ROOT/pages/amqp/listener-queues.adoc index 03fe292c7a..ed6101ec5c 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/listener-queues.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/listener-queues.adoc @@ -8,7 +8,7 @@ Container can be initially configured to listen on zero queues. Queues can be added and removed at runtime. The `SimpleMessageListenerContainer` recycles (cancels and re-creates) all consumers when any pre-fetched messages have been processed. The `DirectMessageListenerContainer` creates/cancels individual consumer(s) for each queue without affecting consumers on other queues. -See the https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp/rabbit/listener/AbstractMessageListenerContainer.html[Javadoc] for the `addQueues`, `addQueueNames`, `removeQueues` and `removeQueueNames` methods. +See the {spring-amqp-java-docs}/rabbit/listener/AbstractMessageListenerContainer.html[Javadoc] for the `addQueues`, `addQueueNames`, `removeQueues` and `removeQueueNames` methods. If not all queues are available, the container tries to passively declare (and consume from) the missing queues every 60 seconds. diff --git a/src/reference/antora/modules/ROOT/pages/amqp/management-rest-api.adoc b/src/reference/antora/modules/ROOT/pages/amqp/management-rest-api.adoc index 445b46c8a1..a693e1e36d 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/management-rest-api.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/management-rest-api.adoc @@ -5,7 +5,7 @@ When the management plugin is enabled, the RabbitMQ server exposes a REST API to monitor and configure the broker. A https://github.com/rabbitmq/hop[Java Binding for the API] is now provided. The `com.rabbitmq.http.client.Client` is a standard, immediate, and, therefore, blocking API. -It is based on the https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#spring-web[Spring Web] module and its `RestTemplate` implementation. +It is based on the {spring-framework-docs}/web.html[Spring Web] module and its `RestTemplate` implementation. On the other hand, the `com.rabbitmq.http.client.ReactorNettyClient` is a reactive, non-blocking implementation based on the https://projectreactor.io/docs/netty/release/reference/docs/index.html[Reactor Netty] project. The hop dependency (`com.rabbitmq:http-client`) is now also `optional`. diff --git a/src/reference/antora/modules/ROOT/pages/amqp/message-converters.adoc b/src/reference/antora/modules/ROOT/pages/amqp/message-converters.adoc index b828342c4b..c028af61bd 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/message-converters.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/message-converters.adoc @@ -356,7 +356,7 @@ It has been replaced by `AbstractJackson2MessageConverter`. Yet another option is the `MarshallingMessageConverter`. It delegates to the Spring OXM library's implementations of the `Marshaller` and `Unmarshaller` strategy interfaces. -You can read more about that library https://docs.spring.io/spring/docs/current/spring-framework-reference/html/oxm.html[here]. +You can read more about that library {spring-framework-docs}/data-access/oxm.html[here]. In terms of configuration, it is most common to provide only the constructor argument, since most implementations of `Marshaller` also implement `Unmarshaller`. The following example shows how to configure a `MarshallingMessageConverter`: diff --git a/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/async-annotation-driven/enable.adoc b/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/async-annotation-driven/enable.adoc index 71d39dc08b..422de556ef 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/async-annotation-driven/enable.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/async-annotation-driven/enable.adoc @@ -37,7 +37,7 @@ In this case, and ignoring the RabbitMQ infrastructure setup, the `processOrder` You can customize the listener container factory to use for each annotation, or you can configure an explicit default by implementing the `RabbitListenerConfigurer` interface. The default is required only if at least one endpoint is registered without a specific container factory. -See the https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp/rabbit/annotation/RabbitListenerConfigurer.html[Javadoc] for full details and examples. +See the {spring-amqp-java-docs}/rabbit/annotation/RabbitListenerConfigurer.html[Javadoc] for full details and examples. The container factories provide methods for adding `MessagePostProcessor` instances that are applied after receiving messages (before invoking the listener) and before sending replies. diff --git a/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/micrometer-observation.adoc b/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/micrometer-observation.adoc index 7d30d09065..bbd1c340ee 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/micrometer-observation.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/micrometer-observation.adoc @@ -7,7 +7,7 @@ Using Micrometer for observation is now supported, since version 3.0, for the `R Set `observationEnabled` on each component to enable observation; this will disable xref:amqp/receiving-messages/micrometer.adoc[Micrometer Timers] because the timers will now be managed with each observation. When using annotated listeners, set `observationEnabled` on the container factory. -Refer to https://docs.micrometer.io/tracing/reference/[Micrometer Tracing] for more information. +Refer to {micrometer-tracing-docs}[Micrometer Tracing] for more information. To add tags to timers/traces, configure a custom `RabbitTemplateObservationConvention` or `RabbitListenerObservationConvention` to the template or listener container, respectively. diff --git a/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/micrometer.adoc b/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/micrometer.adoc index efae24ebfb..bc581083ad 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/micrometer.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/receiving-messages/micrometer.adoc @@ -2,7 +2,7 @@ = Micrometer Integration :page-section-summary-toc: 1 -NOTE: This section documents the integration with https://docs.micrometer.io/micrometer/reference/[Micrometer]. +NOTE: This section documents the integration with {micrometer-micrometer-docs}[Micrometer]. For integration with Micrometer Observation, see xref:amqp/receiving-messages/micrometer-observation.adoc[Micrometer Observation]. Starting with version 2.2, the listener containers will automatically create and update Micrometer `Timer` s for the listener, if `Micrometer` is detected on the class path, and a single `MeterRegistry` is present in the application context (or exactly one is annotated `@Primary`, such as when using Spring Boot). diff --git a/src/reference/antora/modules/ROOT/pages/amqp/request-reply.adoc b/src/reference/antora/modules/ROOT/pages/amqp/request-reply.adoc index 57d515d987..2a17bb8350 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/request-reply.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/request-reply.adoc @@ -6,11 +6,11 @@ Those methods are quite useful for request-reply scenarios, since they handle th Similar request-reply methods are also available where the `MessageConverter` is applied to both the request and reply. Those methods are named `convertSendAndReceive`. -See the https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp/core/AmqpTemplate.html[Javadoc of `AmqpTemplate`] for more detail. +See the {spring-amqp-java-docs}/core/AmqpTemplate.html[Javadoc of `AmqpTemplate`] for more detail. Starting with version 1.5.0, each of the `sendAndReceive` method variants has an overloaded version that takes `CorrelationData`. Together with a properly configured connection factory, this enables the receipt of publisher confirms for the send side of the operation. -See xref:amqp/template.adoc#template-confirms[Correlated Publisher Confirms and Returns] and the https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp/rabbit/core/RabbitOperations.html[Javadoc for `RabbitOperations`] for more information. +See xref:amqp/template.adoc#template-confirms[Correlated Publisher Confirms and Returns] and the {spring-amqp-java-docs}/rabbit/core/RabbitOperations.html[Javadoc for `RabbitOperations`] for more information. Starting with version 2.0, there are variants of these methods (`convertSendAndReceiveAsType`) that take an additional `ParameterizedTypeReference` argument to convert complex returned types. The template must be configured with a `SmartMessageConverter`. diff --git a/src/reference/antora/modules/ROOT/pages/amqp/resilience-recovering-from-errors-and-broker-failures.adoc b/src/reference/antora/modules/ROOT/pages/amqp/resilience-recovering-from-errors-and-broker-failures.adoc index 18f5107668..f9c89b3e77 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/resilience-recovering-from-errors-and-broker-failures.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/resilience-recovering-from-errors-and-broker-failures.adoc @@ -90,7 +90,7 @@ public StatefulRetryOperationsInterceptor interceptor() { Only a subset of retry capabilities can be configured this way. More advanced features would need the configuration of a `RetryTemplate` as a Spring bean. -See the https://docs.spring.io/spring-retry/docs/api/current/[Spring Retry Javadoc] for complete information about available policies and their configuration. +See the {spring-retry-java-docs}[Spring Retry Javadoc] for complete information about available policies and their configuration. [[batch-retry]] == Retry with Batch Listeners diff --git a/src/reference/antora/modules/ROOT/pages/amqp/sending-messages.adoc b/src/reference/antora/modules/ROOT/pages/amqp/sending-messages.adoc index 961b8daa13..0d1eaa72da 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/sending-messages.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/sending-messages.adoc @@ -100,7 +100,7 @@ Message message = MessageBuilder.withBody("foo".getBytes()) .build(); ---- -Each of the properties defined on the https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp/core/MessageProperties.html[`MessageProperties`] can be set. +Each of the properties defined on the {spring-amqp-java-docs}/core/MessageProperties.html[`MessageProperties`] can be set. Other methods include `setHeader(String key, String value)`, `removeHeader(String key)`, `removeHeaders()`, and `copyProperties(MessageProperties properties)`. Each property setting method has a `set*IfAbsent()` variant. In the cases where a default initial value exists, the method is named `set*IfAbsentOrDefault()`. diff --git a/src/reference/antora/modules/ROOT/pages/amqp/transactions.adoc b/src/reference/antora/modules/ROOT/pages/amqp/transactions.adoc index c007b02199..59bb842f7b 100644 --- a/src/reference/antora/modules/ROOT/pages/amqp/transactions.adoc +++ b/src/reference/antora/modules/ROOT/pages/amqp/transactions.adoc @@ -69,7 +69,7 @@ If the `channelTransacted` flag was set to `false` (the default) in the precedin Prior to version 1.6.6, adding a rollback rule to a container's `transactionAttribute` when using an external transaction manager (such as JDBC) had no effect. Exceptions always rolled back the transaction. -Also, when using a https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/transaction.html#transaction-declarative[transaction advice] in the container's advice chain, conditional rollback was not very useful, because all listener exceptions are wrapped in a `ListenerExecutionFailedException`. +Also, when using a {spring-framework-docs}/data-access/transaction/declarative.html[transaction advice] in the container's advice chain, conditional rollback was not very useful, because all listener exceptions are wrapped in a `ListenerExecutionFailedException`. The first problem has been corrected, and the rules are now applied properly. Further, the `ListenerFailedRuleBasedTransactionAttribute` is now provided. @@ -116,13 +116,13 @@ See xref:amqp/containerAttributes.adoc[Message Listener Container Configuration] [[using-rabbittransactionmanager]] == Using `RabbitTransactionManager` -The https://docs.spring.io/spring-amqp/docs/current/api/org/springframework/amqp/rabbit/transaction/RabbitTransactionManager.html[RabbitTransactionManager] is an alternative to executing Rabbit operations within, and synchronized with, external transactions. -This transaction manager is an implementation of the https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/transaction/PlatformTransactionManager.html[`PlatformTransactionManager`] interface and should be used with a single Rabbit `ConnectionFactory`. +The {spring-amqp-java-docs}/rabbit/transaction/RabbitTransactionManager.html[RabbitTransactionManager] is an alternative to executing Rabbit operations within, and synchronized with, external transactions. +This transaction manager is an implementation of the {spring-framework-java-docs}/transaction/PlatformTransactionManager.html[`PlatformTransactionManager`] interface and should be used with a single Rabbit `ConnectionFactory`. IMPORTANT: This strategy is not able to provide XA transactions -- for example, in order to share transactions between messaging and database access. Application code is required to retrieve the transactional Rabbit resources through `ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactory, boolean)` instead of a standard `Connection.createChannel()` call with subsequent channel creation. -When using Spring AMQP's https://docs.spring.io/spring-amqp/docs/latest_ga/api/org/springframework/amqp/rabbit/core/RabbitTemplate.html[RabbitTemplate], it will autodetect a thread-bound Channel and automatically participate in its transaction. +When using Spring AMQP's {spring-amqp-java-docs}/rabbit/core/RabbitTemplate.html[RabbitTemplate], it will autodetect a thread-bound Channel and automatically participate in its transaction. With Java Configuration, you can setup a new RabbitTransactionManager by using the following bean: diff --git a/src/reference/antora/modules/ROOT/pages/appendix/native.adoc b/src/reference/antora/modules/ROOT/pages/appendix/native.adoc index ee924671a2..8234dc91e6 100644 --- a/src/reference/antora/modules/ROOT/pages/appendix/native.adoc +++ b/src/reference/antora/modules/ROOT/pages/appendix/native.adoc @@ -2,6 +2,6 @@ = Native Images :page-section-summary-toc: 1 -https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#aot[Spring AOT] native hints are provided to assist in developing native images for Spring applications that use Spring AMQP. +{spring-framework-docs}/core/aot.html[Spring AOT] native hints are provided to assist in developing native images for Spring applications that use Spring AMQP. Some examples can be seen in the https://github.com/spring-projects/spring-aot-smoke-tests/tree/main/integration[`spring-aot-smoke-tests` GitHub repository]. diff --git a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-3-since-1-2.adoc b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-3-since-1-2.adoc index da13067fff..7aa1b869ff 100644 --- a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-3-since-1-2.adoc +++ b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-3-since-1-2.adoc @@ -5,14 +5,14 @@ == Listener Concurrency The listener container now supports dynamic scaling of the number of consumers based on workload, or you can programmatically change the concurrency without stopping the container. -See <>. +See xref:amqp/listener-concurrency.adoc#listener-concurrency[Listener Concurrency]. [[listener-queues]] == Listener Queues The listener container now permits the queues on which it listens to be modified at runtime. Also, the container now starts if at least one of its configured queues is available for use. -See <> +See xref:amqp/listener-queues.adoc#listener-queues[Listener Container Queues] This listener container now redeclares any auto-delete queues during startup. See xref:amqp/receiving-messages/async-consumer.adoc#lc-auto-delete[`auto-delete` Queues]. @@ -21,13 +21,13 @@ See xref:amqp/receiving-messages/async-consumer.adoc#lc-auto-delete[`auto-delete == Consumer Priority The listener container now supports consumer arguments, letting the `x-priority` argument be set. -See <>. +See xref:amqp/receiving-messages/async-consumer.adoc#consumer-priority[Consumer Priority]. [[exclusive-consumer]] == Exclusive Consumer You can now configure `SimpleMessageListenerContainer` with a single `exclusive` consumer, preventing other consumers from listening to the queue. -See <>. +See xref:amqp/exclusive-consumer.adoc[Exclusive Consumer]. [[rabbit-admin]] == Rabbit Admin @@ -47,7 +47,7 @@ If you wish to bind with an empty string routing key, you need to specify `key=" The `AmqpTemplate` now provides several synchronous `receiveAndReply` methods. These are implemented by the `RabbitTemplate`. -For more information see <>. +For more information see xref:amqp/receiving-messages.adoct[Receiving Messages]. The `RabbitTemplate` now supports configuring a `RetryTemplate` to attempt retries (with optional back-off policy) for when the broker is not available. For more information see xref:amqp/template.adoc#template-retry[Adding Retry Capabilities]. @@ -66,12 +66,11 @@ You can now configure the `` of the `` with a `key/va These options are mutually exclusive. See xref:amqp/broker-configuration.adoc#headers-exchange[Headers Exchange]. -[[routing-connection-factory]] == Routing Connection Factory A new `SimpleRoutingConnectionFactory` has been introduced. It allows configuration of `ConnectionFactories` mapping, to determine the target `ConnectionFactory` to use at runtime. -See <>. +See xref:amqp/connections.adoc#routing-connection-factory[routing-connection-factory]. [[messagebuilder-and-messagepropertiesbuilder]] == `MessageBuilder` and `MessagePropertiesBuilder` diff --git a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-4-since-1-3.adoc b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-4-since-1-3.adoc index a4346e4ba4..c43098a182 100644 --- a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-4-since-1-3.adoc +++ b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-4-since-1-3.adoc @@ -35,14 +35,14 @@ See xref:amqp/template.adoc#template-confirms[Correlated Publisher Confirms and `RabbitConnectionFactoryBean` creates the underlying RabbitMQ `ConnectionFactory` used by the `CachingConnectionFactory`. This enables configuration of SSL options using Spring's dependency injection. -See <>. +See xref:amqp/connections.adoc#connection-factory[Configuring the Underlying Client Connection Factory]. [[using-cachingconnectionfactory]] == Using `CachingConnectionFactory` The `CachingConnectionFactory` now lets the `connectionTimeout` be set as a property or as an attribute in the namespace. It sets the property on the underlying RabbitMQ `ConnectionFactory`. -See <>. +See xref:amqp/connections.adoc#connection-factory[Configuring the Underlying Client Connection Factory]. [[log-appender]] == Log Appender @@ -71,13 +71,13 @@ The `mandatoryExpression`, `sendConnectionFactorySelectorExpression`, and `recei The `mandatoryExpression` is used to evaluate a `mandatory` boolean value against each request message when a `ReturnCallback` is in use. See xref:amqp/template.adoc#template-confirms[Correlated Publisher Confirms and Returns]. The `sendConnectionFactorySelectorExpression` and `receiveConnectionFactorySelectorExpression` are used when an `AbstractRoutingConnectionFactory` is provided, to determine the `lookupKey` for the target `ConnectionFactory` at runtime on each AMQP protocol interaction operation. -See <>. +See xref:amqp/connections.adoc#routing-connection-factory[routing-connection-factory]. [[listeners-and-the-routing-connection-factory]] == Listeners and the Routing Connection Factory You can configure a `SimpleMessageListenerContainer` with a routing connection factory to enable connection selection based on the queue names. -See <>. +See xref:amqp/connections.adoc#routing-connection-factory[routing-connection-factory]. [[rabbittemplate:-recoverycallback-option]] == `RabbitTemplate`: `RecoveryCallback` Option diff --git a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-5-since-1-4.adoc b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-5-since-1-4.adoc index 29282a0033..4b5621cb0e 100644 --- a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-5-since-1-4.adoc +++ b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-5-since-1-4.adoc @@ -5,7 +5,7 @@ == `spring-erlang` Is No Longer Supported The `spring-erlang` jar is no longer included in the distribution. -Use <> instead. +Use xref:amqp/management-rest-api.adoc#management-rest-api[RabbitMQ REST API] instead. [[cachingconnectionfactory-changes]] == `CachingConnectionFactory` Changes @@ -122,7 +122,7 @@ See xref:amqp/request-reply.adoc#reply-listener[Reply Listener Container] for mo == `RabbitManagementTemplate` Added The `RabbitManagementTemplate` has been introduced to monitor and configure the RabbitMQ Broker by using the REST API provided by its https://www.rabbitmq.com/management.html[management plugin]. -See <> for more information. +See xref:amqp/management-rest-api.adoc#management-rest-api[RabbitMQ REST API] for more information. [[listener-container-bean-names-xml]] == Listener Container Bean Names (XML) @@ -160,7 +160,7 @@ See xref:amqp/containerAttributes.adoc[Message Listener Container Configuration] == Channel Close Logging A mechanism to control the log levels of channel closure has been introduced. -See <>. +See xref:amqp/connections.adoc#channel-close-logging[Logging Channel Close Events]. [[application-events]] == Application Events diff --git a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-6-since-1-5.adoc b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-6-since-1-5.adoc index 02d8037f46..2e96f8fea2 100644 --- a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-6-since-1-5.adoc +++ b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-6-since-1-5.adoc @@ -189,7 +189,7 @@ See xref:amqp/receiving-messages/async-annotation-driven.adoc[Annotation-driven == Delayed Message Exchange Spring AMQP now has first class support for the RabbitMQ Delayed Message Exchange plugin. -See <> for more information. +See xref:amqp/delayed-message-exchange.adoc[Delayed Message Exchange] for more information. [[exchange-internal-flag]] == Exchange Internal Flag @@ -235,7 +235,7 @@ factory. You can now configure a "`allowed list`" of allowable classes when you use Java deserialization. You should consider creating an allowed list if you accept messages with serialized java objects from untrusted sources. -See <> for more information. +See amqp/message-converters.adoc#java-deserialization[Java Deserialization] for more information. [[json-messageconverter]] == JSON `MessageConverter` diff --git a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-7-since-1-6.adoc b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-7-since-1-6.adoc index 2c565b3025..054dd56e42 100644 --- a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-7-since-1-6.adoc +++ b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-1-7-since-1-6.adoc @@ -51,7 +51,7 @@ The framework is no longer compatible with previous versions. == JUnit `@Rules` Rules that have previously been used internally by the framework have now been made available in a separate jar called `spring-rabbit-junit`. -See <> for more information. +See xref:testing.adoc#junit-rules[JUnit4 `@Rules`] for more information. [[container-conditional-rollback]] == Container Conditional Rollback diff --git a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-2-0-since-1-7.adoc b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-2-0-since-1-7.adoc index 9355130498..92fd10598b 100644 --- a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-2-0-since-1-7.adoc +++ b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-2-0-since-1-7.adoc @@ -68,7 +68,7 @@ See xref:amqp/request-reply.adoc#async-template[Async Rabbit Template] for more The `RabbitTemplate` and `AsyncRabbitTemplate` now have `receiveAndConvert` and `convertSendAndReceiveAsType` methods that take a `ParameterizedTypeReference` argument, letting the caller specify the type to which to convert the result. This is particularly useful for complex types or when type information is not conveyed in message headers. It requires a `SmartMessageConverter` such as the `Jackson2JsonMessageConverter`. -See xref:amqp/request-reply.adoc[Request/Reply Messaging], xref:amqp/request-reply.adoc#async-template[Async Rabbit Template], xref:amqp/message-converters.adoc#json-complex[Converting From a `Message` With `RabbitTemplate`], and <> for more information. +See xref:amqp/request-reply.adoc[Request/Reply Messaging], xref:amqp/request-reply.adoc#async-template[Async Rabbit Template], xref:amqp/message-converters.adoc#json-complex[Converting From a `Message` With `RabbitTemplate`], and xref:amqp/message-converters.adoc#json-complex[Converting From a `Message` With `RabbitTemplate`] for more information. You can now use a `RabbitTemplate` to perform multiple operations on a dedicated channel. See xref:amqp/template.adoc#scoped-operations[Scoped Operations] for more information. @@ -179,7 +179,7 @@ See xref:amqp/transactions.adoc#conditional-rollback[Conditional Rollback] for m Deprecated in previous versions, Jackson `1.x` converters and related components have now been deleted. You can use similar components based on Jackson 2.x. -See <> for more information. +See xref:amqp/message-converters.adoc#json-message-converter[`Jackson2JsonMessageConverter`] for more information. [[json-message-converter]] == JSON Message Converter diff --git a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-2-1-since-2-0.adoc b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-2-1-since-2-0.adoc index a905c1899b..07f3bacc9c 100644 --- a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-2-1-since-2-0.adoc +++ b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-in-2-1-since-2-0.adoc @@ -81,7 +81,7 @@ See xref:amqp/message-converters.adoc#jackson2xml[`Jackson2XmlMessageConverter`] == Management REST API The `RabbitManagementTemplate` is now deprecated in favor of the direct `com.rabbitmq.http.client.Client` (or `com.rabbitmq.http.client.ReactorNettyClient`) usage. -See <> for more information. +See xref:amqp/management-rest-api.adoc#management-rest-api[RabbitMQ REST API] for more information. [[rabbitlistener-changes]] == `@RabbitListener` Changes diff --git a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-to-1-2-since-1-1.adoc b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-to-1-2-since-1-1.adoc index 17410e9823..4180c54d78 100644 --- a/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-to-1-2-since-1-1.adoc +++ b/src/reference/antora/modules/ROOT/pages/appendix/previous-whats-new/changes-to-1-2-since-1-1.adoc @@ -47,7 +47,7 @@ See xref:amqp/broker-configuration.adoc#conditional-declaration[Conditional Decl == AMQP Remoting Facilities are now provided for using Spring remoting techniques, using AMQP as the transport for the RPC calls. -For more information see <> +For more information see xref:amqp/request-reply.adoc#remoting[Spring Remoting with AMQP]. [[requested-heart-beats]] == Requested Heart Beats diff --git a/src/reference/antora/modules/ROOT/pages/integration-reference.adoc b/src/reference/antora/modules/ROOT/pages/integration-reference.adoc index 77745b8955..1dbc762022 100644 --- a/src/reference/antora/modules/ROOT/pages/integration-reference.adoc +++ b/src/reference/antora/modules/ROOT/pages/integration-reference.adoc @@ -13,7 +13,7 @@ We provide an inbound-channel-adapter, an outbound-channel-adapter, an inbound-g Since the AMQP adapters are part of the Spring Integration release, the documentation is available as part of the Spring Integration distribution. We provide a quick overview of the main features here. -See the https://docs.spring.io/spring-integration/reference[Spring Integration Reference Guide] for much more detail. +See the {spring-integration-docs}[Spring Integration Reference Guide] for much more detail. [[inbound-channel-adapter]] == Inbound Channel Adapter diff --git a/src/reference/antora/modules/ROOT/pages/logging.adoc b/src/reference/antora/modules/ROOT/pages/logging.adoc index 21b6855381..cf9b0ff0e5 100644 --- a/src/reference/antora/modules/ROOT/pages/logging.adoc +++ b/src/reference/antora/modules/ROOT/pages/logging.adoc @@ -395,7 +395,7 @@ public class MyEnhancedAppender extends AmqpAppender { } ---- -The Log4j 2 appender supports using a https://logging.apache.org/log4j/2.x/manual/appenders.html#BlockingQueueFactory[`BlockingQueueFactory`], as the following example shows: +The Log4j 2 appender supports using a https://logging.apache.org/log4j/2.x/manual/appenders/delegating.html#BlockingQueueFactory[`BlockingQueueFactory`], as the following example shows: [source, xml] ---- diff --git a/src/reference/antora/modules/ROOT/pages/sample-apps.adoc b/src/reference/antora/modules/ROOT/pages/sample-apps.adoc index bf983d5edc..90a2775e53 100644 --- a/src/reference/antora/modules/ROOT/pages/sample-apps.adoc +++ b/src/reference/antora/modules/ROOT/pages/sample-apps.adoc @@ -20,7 +20,7 @@ You can import the `spring-rabbit-helloworld` sample into the IDE and then follo Within the `src/main/java` directory, navigate to the `org.springframework.amqp.helloworld` package. Open the `HelloWorldConfiguration` class and notice that it contains the `@Configuration` annotation at the class level and notice some `@Bean` annotations at method-level. This is an example of Spring's Java-based configuration. -You can read more about that https://docs.spring.io/spring/docs/current/spring-framework-reference/html/beans.html#beans-java[here]. +You can read more about that {spring-framework-docs}/core/beans/java.html[here]. The following listing shows how the connection factory is created: @@ -144,7 +144,7 @@ static class ScheduledProducer { ---- You do not need to understand all of the details, since the real focus should be on the receiving side (which we cover next). -However, if you are not yet familiar with Spring task scheduling support, you can learn more https://docs.spring.io/spring/docs/current/spring-framework-reference/html/scheduling.html#scheduling-annotation-support[here]. +However, if you are not yet familiar with Spring task scheduling support, you can learn more {spring-framework-docs}/integration/scheduling.html#scheduling-annotation-support-scheduled[here]. The short story is that the `postProcessor` bean in the `ProducerConfiguration` registers the task with a scheduler. Now we can turn to the receiving side. @@ -351,4 +351,4 @@ Spring applications, when sending JSON, set the `__TypeId__` header to the fully The `spring-rabbit-json` sample explores several techniques to convert the JSON from a non-Spring application. -See also xref:amqp/message-converters.adoc#json-message-converter[`Jackson2JsonMessageConverter`] as well as the https://docs.spring.io/spring-amqp/docs/current/api/index.html?org/springframework/amqp/support/converter/DefaultClassMapper.html[Javadoc for the `DefaultClassMapper`]. +See also xref:amqp/message-converters.adoc#json-message-converter[`Jackson2JsonMessageConverter`] as well as the {spring-amqp-java-docs}/index.html?org/springframework/amqp/support/converter/DefaultClassMapper.html[Javadoc for the `DefaultClassMapper`]. diff --git a/src/reference/antora/modules/ROOT/pages/stream.adoc b/src/reference/antora/modules/ROOT/pages/stream.adoc index 4994354fca..8943b31695 100644 --- a/src/reference/antora/modules/ROOT/pages/stream.adoc +++ b/src/reference/antora/modules/ROOT/pages/stream.adoc @@ -109,7 +109,7 @@ You can also send native stream `Message` s directly; with the `messageBuilder() The `ProducerCustomizer` provides a mechanism to customize the producer before it is built. -Refer to the https://rabbitmq.github.io/rabbitmq-stream-java-client/stable/htmlsingle/[Java Client Documentation] about customizing the `Environment` and `Producer`. +Refer to the {rabbitmq-stream-docs}[Java Client Documentation] about customizing the `Environment` and `Producer`. IMPORTANT: Starting with version 3.0, the method return types are `CompletableFuture` instead of `ListenableFuture`. @@ -135,7 +135,7 @@ See xref:amqp/containerAttributes.adoc[Message Listener Container Configuration] Similar the template, the container has a `ConsumerCustomizer` property. -Refer to the https://rabbitmq.github.io/rabbitmq-stream-java-client/stable/htmlsingle/[Java Client Documentation] about customizing the `Environment` and `Consumer`. +Refer to the {rabbitmq-stream-docs}[Java Client Documentation] about customizing the `Environment` and `Consumer`. When using `@RabbitListener`, configure a `StreamRabbitListenerContainerFactory`; at this time, most `@RabbitListener` properties (`concurrency`, etc) are ignored. Only `id`, `queues`, `autoStartup` and `containerFactory` are supported. In addition, `queues` can only contain one stream name. @@ -287,7 +287,7 @@ StreamListenerContainer container(Environment env, String name) { ---- IMPORTANT: At this time, when the concurrency is greater than 1, the actual concurrency is further controlled by the `Environment`; to achieve full concurrency, set the environment's `maxConsumersByConnection` to 1. -See https://rabbitmq.github.io/rabbitmq-stream-java-client/snapshot/htmlsingle/#configuring-the-environment[Configuring the Environment]. +See {rabbitmq-stream-docs}/#configuring-the-environment[Configuring the Environment]. [[stream-micrometer-observation]] == Micrometer Observation @@ -298,7 +298,7 @@ The container now also supports Micrometer timers (when observation is not enabl Set `observationEnabled` on each component to enable observation; this will disable xref:amqp/receiving-messages/micrometer.adoc[Micrometer Timers] because the timers will now be managed with each observation. When using annotated listeners, set `observationEnabled` on the container factory. -Refer to https://docs.micrometer.io/tracing/reference/[Micrometer Tracing] for more information. +Refer to {micrometer-tracing-docs}[Micrometer Tracing] for more information. To add tags to timers/traces, configure a custom `RabbitStreamTemplateObservationConvention` or `RabbitStreamListenerObservationConvention` to the template or listener container, respectively.