NO-JIRA clarify JmsTemplate warning

This commit is contained in:
Justin Bertram 2022-07-16 14:52:27 -05:00
parent 0f5bd28e23
commit a0fb174c8f
No known key found for this signature in database
GPG Key ID: F41830B875BB8633
1 changed files with 7 additions and 7 deletions

View File

@ -217,13 +217,13 @@ from other providers (e.g. IBM or JRockit)
> **Note:**
>
> Some popular libraries such as the Spring JMS Template are known to use
> these anti-patterns. If you're using Spring JMS Template and you're getting
> poor performance you know why. Don't blame Apache ActiveMQ Artemis! The
> Spring JMS Template can only safely be used in an app server which caches
> JMS sessions (e.g. using JCA), and only then for sending messages. It
> cannot be safely be used for synchronously consuming messages, even in an
> app server.
> Spring's `JmsTemplate` is known to use this anti-pattern. It can only
> safely be used with a connection pool (e.g. in a Java EE application server
> using JCA), and even then it should only be used for sending messages. It
> cannot be safely be used for synchronously consuming messages, even with
> a connection pool. If you need a connection pool take a look at
> [this](https://github.com/messaginghub/pooled-jms) which was forked from the
> ActiveMQ code-base into its own project with full support for JMS 2.
- Avoid fat messages. Verbose formats such as XML take up a lot of space on the
wire and performance will suffer as result. Avoid XML in message bodies if