Skip to content

Commit

Permalink
Fix links in docs
Browse files Browse the repository at this point in the history
* Fix links in section Previous Releases 
* Declare some attributes represent document links
  • Loading branch information
ngocnhan-tran1996 authored Sep 16, 2024
1 parent 2ebc7ef commit c6dcc76
Show file tree
Hide file tree
Showing 26 changed files with 58 additions and 48 deletions.
13 changes: 12 additions & 1 deletion src/reference/antora/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,15 @@ ext:
asciidoc:
attributes:
attribute-missing: 'warn'
chomp: 'all'
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'
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<listener-concurrency>>.
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 <<listener-queues>>
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].
Expand All @@ -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 <<consumer-priority>>.
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 <<exclusive-consumer>>.
See xref:amqp/exclusive-consumer.adoc[Exclusive Consumer].

[[rabbit-admin]]
== Rabbit Admin
Expand All @@ -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 <<receiving-messages>>.
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].
Expand All @@ -66,12 +66,11 @@ You can now configure the `<binding>` of the `<headers-exchange>` 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 <<routing-connection-factory>>.
See xref:amqp/connections.adoc#routing-connection-factory[routing-connection-factory].

[[messagebuilder-and-messagepropertiesbuilder]]
== `MessageBuilder` and `MessagePropertiesBuilder`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<connection-factory>>.
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 <<connection-factory>>.
See xref:amqp/connections.adoc#connection-factory[Configuring the Underlying Client Connection Factory].

[[log-appender]]
== Log Appender
Expand Down Expand Up @@ -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 <<routing-connection-factory>>.
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 <<routing-connection-factory>>.
See xref:amqp/connections.adoc#routing-connection-factory[routing-connection-factory].

[[rabbittemplate:-recoverycallback-option]]
== `RabbitTemplate`: `RecoveryCallback` Option
Expand Down
Loading

0 comments on commit c6dcc76

Please sign in to comment.