Skip to content

Commit 0c5f0ef

Browse files
phxqlwilkinsona
authored andcommitted
Explain how to disable/configure the ActiveMQ embedded broker
See gh-28183
1 parent 773b0f9 commit 0c5f0ef

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5840,12 +5840,25 @@ 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 an embedded broker is started, if you don't disable it explicitly and don't set the broker url. The broker
5850+
url is then autoconfigured to use the https://activemq.apache.org/vm-transport-reference.html[VM transport], which starts
5851+
an ActiveMQ broker in the same JVM instance.
5852+
5853+
You can disable the embedded broker by declaring the following section in `application.properties`:
5854+
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
5855+
----
5856+
spring:
5857+
activemq:
5858+
in-memory: false
5859+
----
5860+
5861+
or by setting the broker url explicitly:
58495862

58505863
[source,yaml,indent=0,configprops,configblocks]
58515864
----

0 commit comments

Comments
 (0)