Skip to content

Commit 7a38455

Browse files
committed
Merge pull request #28183 from phxql
* gh-28183: Polish "Explain how to disable/configure the ActiveMQ embedded broker" Explain how to disable/configure the ActiveMQ embedded broker Closes gh-28183
2 parents 773b0f9 + 8a78864 commit 7a38455

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5840,12 +5840,24 @@ Spring Boot also auto-configures the necessary infrastructure to send and receiv
58405840
[[boot-features-activemq]]
58415841
==== ActiveMQ Support
58425842
When https://activemq.apache.org/[ActiveMQ] is available on the classpath, Spring Boot can also configure a `ConnectionFactory`.
5843-
If the broker is present, an embedded broker is automatically started and configured (provided no broker URL is specified through configuration).
5843+
If the broker is present, an embedded broker is automatically started and configured (provided no broker URL is specified through configuration and the embedded broker is not disabled in the configuration).
58445844

58455845
NOTE: If you use `spring-boot-starter-activemq`, the necessary dependencies to connect or embed an ActiveMQ instance are provided, as is the Spring infrastructure to integrate with JMS.
58465846

58475847
ActiveMQ configuration is controlled by external configuration properties in `+spring.activemq.*+`.
5848-
For example, you might declare the following section in `application.properties`:
5848+
5849+
By default, ActiveMQ is auto-configured to use the https://activemq.apache.org/vm-transport-reference.html[VM transport], which starts a broker embedded in the same JVM instance.
5850+
5851+
You can disable the embedded broker by configuring the configprop:spring.activemq.in-memory[] property, as shown in the following example:
5852+
5853+
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
5854+
----
5855+
spring:
5856+
activemq:
5857+
in-memory: false
5858+
----
5859+
5860+
The embedded broker will also be disabled if you configure the broker URL, as shown in the following example:
58495861

58505862
[source,yaml,indent=0,configprops,configblocks]
58515863
----
@@ -5856,6 +5868,8 @@ For example, you might declare the following section in `application.properties`
58565868
password: "secret"
58575869
----
58585870

5871+
If you want to take full control over the embedded broker, refer to https://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html[the ActiveMQ documentation] for further information.
5872+
58595873
By default, a `CachingConnectionFactory` wraps the native `ConnectionFactory` with sensible settings that you can control by external configuration properties in `+spring.jms.*+`:
58605874

58615875
[source,yaml,indent=0,configprops,configblocks]

0 commit comments

Comments
 (0)