You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* gh-28183:
Polish "Explain how to disable/configure the ActiveMQ embedded broker"
Explain how to disable/configure the ActiveMQ embedded broker
Closesgh-28183
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/spring-boot-features.adoc
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5840,12 +5840,24 @@ Spring Boot also auto-configures the necessary infrastructure to send and receiv
5840
5840
[[boot-features-activemq]]
5841
5841
==== ActiveMQ Support
5842
5842
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).
5844
5844
5845
5845
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.
5846
5846
5847
5847
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:
The embedded broker will also be disabled if you configure the broker URL, as shown in the following example:
5849
5861
5850
5862
[source,yaml,indent=0,configprops,configblocks]
5851
5863
----
@@ -5856,6 +5868,8 @@ For example, you might declare the following section in `application.properties`
5856
5868
password: "secret"
5857
5869
----
5858
5870
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
+
5859
5873
By default, a `CachingConnectionFactory` wraps the native `ConnectionFactory` with sensible settings that you can control by external configuration properties in `+spring.jms.*+`:
0 commit comments