Deprecate HornetQ support
Closes gh-6377
This commit is contained in:
@@ -3963,15 +3963,53 @@ resolved against their provided names.
|
||||
|
||||
[[boot-features-artemis]]
|
||||
==== Artemis support
|
||||
Apache Artemis was formed in 2015 when HornetQ was donated to the Apache Foundation. All
|
||||
the features listed in the <<boot-features-hornetq>> section below can be applied to
|
||||
Artemis. Simply replace `+++spring.hornetq.*+++` properties with `+++spring.artemis.*+++`
|
||||
and use `spring-boot-starter-artemis` instead of `spring-boot-starter-hornetq`. If you
|
||||
want to embed Artemis, make sure to add `org.apache.activemq:artemis-jms-server` to the
|
||||
dependencies of your application.
|
||||
Apache Artemis was formed in 2015 when HornetQ was donated to the Apache Foundation. Make
|
||||
sure to use that rather than the deprecated HornetQ support.
|
||||
|
||||
NOTE: You should not try and use Artemis and HornetQ and the same time.
|
||||
|
||||
Spring Boot can auto-configure a `ConnectionFactory` when it detects that Artemis is
|
||||
available on the classpath. If the broker is present, an embedded broker is started and
|
||||
configured automatically (unless the mode property has been explicitly set). The supported
|
||||
modes are: `embedded` (to make explicit that an embedded broker is required and should
|
||||
lead to an error if the broker is not available in the classpath), and `native` to connect
|
||||
to a broker using the `netty` transport protocol. When the latter is configured, Spring
|
||||
Boot configures a `ConnectionFactory` connecting to a broker running on the local machine
|
||||
with the default settings.
|
||||
|
||||
NOTE: If you are using `spring-boot-starter-artemis` the necessary dependencies to
|
||||
connect to an existing Artemis instance are provided, as well as the Spring infrastructure
|
||||
to integrate with JMS. Adding `org.apache.activemq:artemis-jms-server` to your application
|
||||
allows you to use the embedded mode.
|
||||
|
||||
Artemis configuration is controlled by external configuration properties in
|
||||
`+spring.artemis.*+`. For example, you might declare the following section in
|
||||
`application.properties`:
|
||||
|
||||
[source,properties,indent=0]
|
||||
----
|
||||
spring.artemis.mode=native
|
||||
spring.artemis.host=192.168.1.210
|
||||
spring.artemis.port=9876
|
||||
spring.artemis.user=admin
|
||||
spring.artemis.password=secret
|
||||
----
|
||||
|
||||
When embedding the broker, you can choose if you want to enable persistence, and the list
|
||||
of destinations that should be made available. These can be specified as a comma-separated
|
||||
list to create them with the default options; or you can define bean(s) of type
|
||||
`org.apache.activemq.artemis.jms.server.config.JMSQueueConfiguration` or
|
||||
`org.apache.activemq.artemis.jms.server.config.TopicConfiguration`, for advanced queue and
|
||||
topic configurations respectively.
|
||||
|
||||
See
|
||||
{sc-spring-boot-autoconfigure}/jms/artemis/ArtemisProperties.{sc-ext}[`ArtemisProperties`]
|
||||
for more of the supported options.
|
||||
|
||||
No JNDI lookup is involved at all and destinations are resolved against their names,
|
||||
either using the '`name`' attribute in the Artemis configuration or the names provided
|
||||
through configuration.
|
||||
|
||||
|
||||
|
||||
[[boot-features-hornetq]]
|
||||
|
||||
Reference in New Issue
Block a user