Skip to content

Commit dd92eac

Browse files
committed
Refer to message "receipt" instead of "reception"
1 parent 874f056 commit dd92eac

File tree

11 files changed

+32
-30
lines changed

11 files changed

+32
-30
lines changed

framework-docs/modules/ROOT/pages/integration/jms.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ the same way as Spring's integration does for the JDBC API.
66

77
JMS can be roughly divided into two areas of functionality, namely the production and
88
consumption of messages. The `JmsTemplate` class is used for message production and
9-
synchronous message reception. For asynchronous reception similar to Jakarta EE's
9+
synchronous message receipt. For asynchronous receipt similar to Jakarta EE's
1010
message-driven bean style, Spring provides a number of message-listener containers that
1111
you can use to create Message-Driven POJOs (MDPs). Spring also provides a declarative way
1212
to create message listeners.

framework-docs/modules/ROOT/pages/integration/jms/receiving.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This describes how to receive messages with JMS in Spring.
55

66

77
[[jms-receiving-sync]]
8-
== Synchronous Reception
8+
== Synchronous Receipt
99

1010
While JMS is typically associated with asynchronous processing, you can
1111
consume messages synchronously. The overloaded `receive(..)` methods provide this
@@ -16,7 +16,7 @@ the receiver should wait before giving up waiting for a message.
1616

1717

1818
[[jms-receiving-async]]
19-
== Asynchronous reception: Message-Driven POJOs
19+
== Asynchronous Receipt: Message-Driven POJOs
2020

2121
NOTE: Spring also supports annotated-listener endpoints through the use of the `@JmsListener`
2222
annotation and provides open infrastructure to register endpoints programmatically.
@@ -154,7 +154,7 @@ listener container.
154154

155155
You can activate local resource transactions through the `sessionTransacted` flag
156156
on the listener container definition. Each message listener invocation then operates
157-
within an active JMS transaction, with message reception rolled back in case of listener
157+
within an active JMS transaction, with message receipt rolled back in case of listener
158158
execution failure. Sending a response message (through `SessionAwareMessageListener`) is
159159
part of the same local transaction, but any other resource operations (such as
160160
database access) operate independently. This usually requires duplicate message
@@ -173,7 +173,7 @@ To configure a message listener container for XA transaction participation, you
173173
to configure a `JtaTransactionManager` (which, by default, delegates to the Jakarta EE
174174
server's transaction subsystem). Note that the underlying JMS `ConnectionFactory` needs to
175175
be XA-capable and properly registered with your JTA transaction coordinator. (Check your
176-
Jakarta EE server's configuration of JNDI resources.) This lets message reception as well
176+
Jakarta EE server's configuration of JNDI resources.) This lets message receipt as well
177177
as (for example) database access be part of the same transaction (with unified commit
178178
semantics, at the expense of XA transaction log overhead).
179179

framework-docs/modules/ROOT/pages/integration/jms/using.adoc

+8-6
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,15 @@ operations that do not refer to a specific destination.
167167

168168
One of the most common uses of JMS messages in the EJB world is to drive message-driven
169169
beans (MDBs). Spring offers a solution to create message-driven POJOs (MDPs) in a way
170-
that does not tie a user to an EJB container. (See xref:integration/jms/receiving.adoc#jms-receiving-async[Asynchronous reception: Message-Driven POJOs] for detailed
171-
coverage of Spring's MDP support.) Since Spring Framework 4.1, endpoint methods can be
172-
annotated with `@JmsListener` -- see xref:integration/jms/annotated.adoc[Annotation-driven Listener Endpoints] for more details.
170+
that does not tie a user to an EJB container. (See
171+
xref:integration/jms/receiving.adoc#jms-receiving-async[Asynchronous Receipt: Message-Driven POJOs]
172+
for detailed coverage of Spring's MDP support.) Endpoint methods can be annotated with
173+
`@JmsListener` -- see xref:integration/jms/annotated.adoc[Annotation-driven Listener Endpoints]
174+
for more details.
173175

174176
A message listener container is used to receive messages from a JMS message queue and
175177
drive the `MessageListener` that is injected into it. The listener container is
176-
responsible for all threading of message reception and dispatches into the listener for
178+
responsible for all threading of message receipt and dispatches into the listener for
177179
processing. A message listener container is the intermediary between an MDP and a
178180
messaging provider and takes care of registering to receive messages, participating in
179181
transactions, resource acquisition and release, exception conversion, and so on. This
@@ -227,7 +229,7 @@ the JMS provider, advanced functionality (such as participation in externally ma
227229
transactions), and compatibility with Jakarta EE environments.
228230

229231
You can customize the cache level of the container. Note that, when no caching is enabled,
230-
a new connection and a new session is created for each message reception. Combining this
232+
a new connection and a new session is created for each message receipt. Combining this
231233
with a non-durable subscription with high loads may lead to message loss. Make sure to
232234
use a proper cache level in such a case.
233235

@@ -246,7 +248,7 @@ in the form of a business entity existence check or a protocol table check.
246248
Any such arrangements are significantly more efficient than the alternative:
247249
wrapping your entire processing with an XA transaction (through configuring your
248250
`DefaultMessageListenerContainer` with an `JtaTransactionManager`) to cover the
249-
reception of the JMS message as well as the execution of the business logic in your
251+
receipt of the JMS message as well as the execution of the business logic in your
250252
message listener (including database operations, etc.).
251253

252254
IMPORTANT: The default `AUTO_ACKNOWLEDGE` mode does not provide proper reliability guarantees.

framework-docs/modules/ROOT/pages/integration/observability.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ This instrumentation will create 2 types of observations:
126126
* `"jms.message.publish"` when a JMS message is sent to the broker, typically with `JmsTemplate`.
127127
* `"jms.message.process"` when a JMS message is processed by the application, typically with a `MessageListener` or a `@JmsListener` annotated method.
128128

129-
NOTE: Currently there is no instrumentation for `"jms.message.receive"` observations as there is little value in measuring the time spent waiting for the reception of a message.
129+
NOTE: Currently there is no instrumentation for `"jms.message.receive"` observations as there is little value in measuring the time spent waiting for the receipt of a message.
130130
Such an integration would typically instrument `MessageConsumer#receive` method calls. But once those return, the processing time is not measured and the trace scope cannot be propagated to the application.
131131

132132
By default, both observations share the same set of possible `KeyValues`:

spring-context/src/test/java/org/springframework/context/event/test/EventCollector.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@ public void addEvent(Identifiable listener, Object event) {
4747

4848
/**
4949
* Return the events that the specified listener has received. The list of events
50-
* is ordered according to their reception order.
50+
* is ordered according to the order in which they were received.
5151
*/
5252
public List<Object> getEvents(Identifiable listener) {
5353
return this.content.get(listener.getId());

spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -102,7 +102,7 @@
102102
* (i.e. after your business logic executed but before the JMS part got committed),
103103
* so duplicate message detection is just there to cover a corner case.
104104
* <li>Or wrap your <i>entire processing with an XA transaction</i>, covering the
105-
* reception of the JMS message as well as the execution of the business logic in
105+
* receipt of the JMS message as well as the execution of the business logic in
106106
* your message listener (including database operations etc). This is only
107107
* supported by {@link DefaultMessageListenerContainer}, through specifying
108108
* an external "transactionManager" (typically a

spring-jms/src/main/java/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*
4646
* <p>This listener container variant is built for repeated polling attempts,
4747
* each invoking the {@link #receiveAndExecute} method. The MessageConsumer used
48-
* may be reobtained fo reach attempt or cached in between attempts; this is up
48+
* may be reobtained for each attempt or cached in between attempts; this is up
4949
* to the concrete implementation. The receive timeout for each attempt can be
5050
* configured through the {@link #setReceiveTimeout "receiveTimeout"} property.
5151
*
@@ -56,7 +56,7 @@
5656
* full control over the listening process, allowing for custom scaling and throttling
5757
* and of concurrent message processing (which is up to concrete subclasses).
5858
*
59-
* <p>Message reception and listener execution can automatically be wrapped
59+
* <p>Message receipt and listener execution can automatically be wrapped
6060
* in transactions through passing a Spring
6161
* {@link org.springframework.transaction.PlatformTransactionManager} into the
6262
* {@link #setTransactionManager "transactionManager"} property. This will usually
@@ -105,7 +105,7 @@ public void setSessionTransacted(boolean sessionTransacted) {
105105

106106
/**
107107
* Specify the Spring {@link org.springframework.transaction.PlatformTransactionManager}
108-
* to use for transactional wrapping of message reception plus listener execution.
108+
* to use for transactional wrapping of message receipt plus listener execution.
109109
* <p>Default is none, not performing any transactional wrapping.
110110
* If specified, this will usually be a Spring
111111
* {@link org.springframework.transaction.jta.JtaTransactionManager} or one
@@ -131,7 +131,7 @@ public void setTransactionManager(@Nullable PlatformTransactionManager transacti
131131

132132
/**
133133
* Return the Spring PlatformTransactionManager to use for transactional
134-
* wrapping of message reception plus listener execution.
134+
* wrapping of message receipt plus listener execution.
135135
*/
136136
@Nullable
137137
protected final PlatformTransactionManager getTransactionManager() {

spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
/**
4848
* Message listener container variant that uses plain JMS client APIs, specifically
4949
* a loop of {@code MessageConsumer.receive()} calls that also allow for
50-
* transactional reception of messages (registering them with XA transactions).
50+
* transactional receipt of messages (registering them with XA transactions).
5151
* Designed to work in a native JMS environment as well as in a Jakarta EE environment,
5252
* with only minimal differences in configuration.
5353
*
@@ -70,7 +70,7 @@
7070
* {@code MessageConsumer} (only refreshed in case of failure), using the JMS provider's
7171
* resources as efficiently as possible.
7272
*
73-
* <p>Message reception and listener execution can automatically be wrapped
73+
* <p>Message receipt and listener execution can automatically be wrapped
7474
* in transactions by passing a Spring
7575
* {@link org.springframework.transaction.PlatformTransactionManager} into the
7676
* {@link #setTransactionManager "transactionManager"} property. This will usually
@@ -474,7 +474,7 @@ public final int getMaxConcurrentConsumers() {
474474

475475
/**
476476
* Specify the maximum number of messages to process in one task.
477-
* More concretely, this limits the number of message reception attempts
477+
* More concretely, this limits the number of message receipt attempts
478478
* per task, which includes receive iterations that did not actually
479479
* pick up a message until they hit their timeout (see the
480480
* {@link #setReceiveTimeout "receiveTimeout"} property).
@@ -562,7 +562,7 @@ public final int getIdleConsumerLimit() {
562562
* The minimum number of consumers
563563
* (see {@link #setConcurrentConsumers "concurrentConsumers"})
564564
* will be kept around until shutdown in any case.
565-
* <p>Within each task execution, a number of message reception attempts
565+
* <p>Within each task execution, a number of message receipt attempts
566566
* (according to the "maxMessagesPerTask" setting) will each wait for an incoming
567567
* message (according to the "receiveTimeout" setting). If all of those receive
568568
* attempts in a given task return without a message, the task is considered

spring-jms/src/main/java/org/springframework/jms/listener/SimpleMessageListenerContainer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
*
5757
* <p>For a different style of MessageListener handling, through looped
5858
* {@code MessageConsumer.receive()} calls that also allow for
59-
* transactional reception of messages (registering them with XA transactions),
59+
* transactional receipt of messages (registering them with XA transactions),
6060
* see {@link DefaultMessageListenerContainer}.
6161
*
6262
* @author Juergen Hoeller

spring-jms/src/main/java/org/springframework/jms/support/JmsHeaders.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -89,7 +89,7 @@ public interface JmsHeaders {
8989

9090
/**
9191
* Specify if the message was resent. This occurs when a message
92-
* consumer fails to acknowledge the message reception.
92+
* consumer fails to acknowledge receipt of the message.
9393
* <p>Read-only value.
9494
* @see jakarta.jms.Message#getJMSRedelivered()
9595
*/

spring-messaging/src/main/java/org/springframework/messaging/PollableChannel.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,9 +36,9 @@ public interface PollableChannel extends MessageChannel {
3636
/**
3737
* Receive a message from this channel, blocking until either a message is available
3838
* or the specified timeout period elapses.
39-
* @param timeout the timeout in milliseconds or {@link MessageChannel#INDEFINITE_TIMEOUT}.
39+
* @param timeout the timeout in milliseconds or {@link MessageChannel#INDEFINITE_TIMEOUT}
4040
* @return the next available {@link Message} or {@code null} if the specified timeout
41-
* period elapses or the message reception is interrupted
41+
* period elapses or the message receipt is interrupted
4242
*/
4343
@Nullable
4444
Message<?> receive(long timeout);

0 commit comments

Comments
 (0)