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
Copy file name to clipboardExpand all lines: src/reference/asciidoc/aggregator.adoc
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -188,7 +188,8 @@ However if, for some reason, you need to access the full `MessageGroup`, you sho
188
188
When handling potentially large groups, you should understand how these methods are invoked, because the release strategy may be invoked multiple times before the group is released.
189
189
The most efficient is an implementation of `ReleaseStrategy`, because the aggregator can invoke it directly.
190
190
The second most efficient is a POJO method with a `Collection<Message<?>>` parameter type.
191
-
The least efficient is a POJO method with a `Collection<Something>` type. The framework has to copy the payloads from the messages in the group into a new collection (and possibly attempt conversion on the payloads to `Something`) every time the release strategy is called.
191
+
The least efficient is a POJO method with a `Collection<Something>` type.
192
+
The framework has to copy the payloads from the messages in the group into a new collection (and possibly attempt conversion on the payloads to `Something`) every time the release strategy is called.
192
193
Using `Collection<?>` avoids the conversion but still requires creating the new `Collection`.
193
194
194
195
For these reasons, for large groups, we recommended that you implement `ReleaseStrategy`.
@@ -597,7 +598,8 @@ Since Spring Integration 2.0, you can handle the various strategies (correlation
597
598
Suppose you have a legacy component that was designed to receive an array of objects.
598
599
We know that the default release strategy assembles all aggregated messages in the `List`.
599
600
Now we have two problems.
600
-
First, we need to extract individual messages from the list. Second, we need to extract the payload of each message and assemble the array of objects.
601
+
First, we need to extract individual messages from the list.
602
+
Second, we need to extract the payload of each message and assemble the array of objects.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/amqp.adoc
+15-22Lines changed: 15 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -551,16 +551,14 @@ If that is not customized at all, the default is `PERSISTENT`.
551
551
Optional.
552
552
<10> An expression that defines correlation data.
553
553
When provided, this configures the underlying AMQP template to receive publisher confirmations.
554
-
Requires a dedicated `RabbitTemplate` and a `CachingConnectionFactory` with the `publisherConfirms` property set to
555
-
`true`. When a publisher confirmation is received and correlation data is supplied, it is written to either the
556
-
`confirm-ack-channel` or the `confirm-nack-channel`, depending on the confirmation type. The payload of the confirmation is
557
-
the correlation data, as defined by this expression.
554
+
Requires a dedicated `RabbitTemplate` and a `CachingConnectionFactory` with the `publisherConfirms` property set to `true`.
555
+
When a publisher confirmation is received and correlation data is supplied, it is written to either the `confirm-ack-channel` or the `confirm-nack-channel`, depending on the confirmation type.
556
+
The payload of the confirmation is the correlation data, as defined by this expression.
558
557
The message has an 'amqp_publishConfirm' header set to `true` (`ack`) or `false` (`nack`).
559
558
Examples: `headers['myCorrelationData']` and `payload`.
560
559
Version 4.1 introduced the `amqp_publishConfirmNackCause` message header.
561
560
It contains the `cause` of a 'nack' for a publisher confirmation.
562
-
Starting with version 4.2, if the expression resolves to a `Message<?>` instance (such as `#this`), the message
563
-
emitted on the `ack`/`nack` channel is based on that message, with the additional header(s) added.
561
+
Starting with version 4.2, if the expression resolves to a `Message<?>` instance (such as `#this`), the message emitted on the `ack`/`nack` channel is based on that message, with the additional header(s) added.
564
562
Previously, a new message was created with the correlation data as its payload, regardless of type.
565
563
Optional.
566
564
<11> The channel to which positive (`ack`) publisher confirms are sent.
@@ -964,28 +962,25 @@ If that is not customized, the default is `PERSISTENT`.
964
962
Optional.
965
963
<13> An expression that defines correlation data.
966
964
When provided, this configures the underlying AMQP template to receive publisher confirmations.
967
-
Requires a dedicated `RabbitTemplate` and a `CachingConnectionFactory` with its `publisherConfirms` property set to
968
-
`true`. When a publisher confirmation is received and correlation data is supplied, the confirmation is written to either the
969
-
`confirm-ack-channel` or the `confirm-nack-channel`, depending on the confirmation type. The payload of the confirmation is
970
-
the correlation data as defined by this expression, and the message has its 'amqp_publishConfirm' header set to `true`
971
-
(`ack`) or `false` (`nack`).
965
+
Requires a dedicated `RabbitTemplate` and a `CachingConnectionFactory` with its `publisherConfirms` property set to `true`.
966
+
When a publisher confirmation is received and correlation data is supplied, the confirmation is written to either the `confirm-ack-channel` or the `confirm-nack-channel`, depending on the confirmation type.
967
+
The payload of the confirmation is the correlation data as defined by this expression, and the message has its 'amqp_publishConfirm' header set to `true` (`ack`) or `false` (`nack`).
972
968
For `nack` instances, an additional header (`amqp_publishConfirmNackCause`) is provided.
If the expression resolves to a `Message<?>` instance (such as "`#this`"), the message
975
-
emitted on the `ack`/`nack` channel is based on that message, with the additional headers added.
970
+
If the expression resolves to a `Message<?>` instance (such as "`#this`"), the message emitted on the `ack`/`nack` channel is based on that message, with the additional headers added.
976
971
Optional.
977
972
<14> The channel to which positive (`ack`) publisher confirmations are sent.
978
973
The payload is the correlation data defined by the `confirm-correlation-expression`.
979
974
Requires the underlying `AsyncRabbitTemplate` to have its `enableConfirms` property set to `true`.
980
975
Optional (the default is `nullChannel`).
981
-
<15> Since version 4.2. The channel to which negative (`nack`) publisher confirmations are sent.
976
+
<15> Since version 4.2.
977
+
The channel to which negative (`nack`) publisher confirmations are sent.
982
978
The payload is the correlation data defined by the `confirm-correlation-expression`.
983
979
Requires the underlying `AsyncRabbitTemplate` to have its `enableConfirms` property set to `true`.
984
980
Optional (the default is `nullChannel`).
985
981
<16> The channel to which returned messages are sent.
986
982
When provided, the underlying AMQP template is configured to return undeliverable messages to the gateway.
987
-
The message is constructed from the data received from AMQP, with the following additional headers:
988
-
`amqp_returnReplyCode`, `amqp_returnReplyText`, `amqp_returnExchange`, and `amqp_returnRoutingKey`.
983
+
The message is constructed from the data received from AMQP, with the following additional headers: `amqp_returnReplyCode`, `amqp_returnReplyText`, `amqp_returnExchange`, and `amqp_returnRoutingKey`.
989
984
Requires the underlying `AsyncRabbitTemplate` to have its `mandatory` property set to `true`.
990
985
Optional.
991
986
<17> When set to `false`, the endpoint tries to connect to the broker during application context initialization.
@@ -1391,13 +1386,11 @@ It also does not map the `deliveryMode` to the `amqp_deliveryMode` header, to av
1391
1386
Instead, this header is mapped to `amqp_receivedDeliveryMode`, which is not mapped on output.
1392
1387
1393
1388
Starting with version 4.3, patterns in the header mappings can be negated by preceding the pattern with `!`.
1394
-
Negated patterns get priority, so a list such as
1395
-
`STANDARD_REQUEST_HEADERS,thing1,ba*,!thing2,!thing3,qux,!thing1` does not map `thing1`
1396
-
(nor `thing2` nor `thing3`).
1389
+
Negated patterns get priority, so a list such as `STANDARD_REQUEST_HEADERS,thing1,ba*,!thing2,!thing3,qux,!thing1` does not map `thing1` (nor `thing2` nor `thing3`).
1397
1390
The standard headers plus `bad` and `qux` are mapped.
1398
1391
1399
-
IMPORTANT: If you have a user-defined header that begins with `!` that you do wish to map, you need to escape it with
1400
-
`\`, as follows: `STANDARD_REQUEST_HEADERS,\!myBangHeader`. The header named `!myBangHeader` is now mapped.
1392
+
IMPORTANT: If you have a user-defined header that begins with `!` that you do wish to map, you need to escape it with `\`, as follows: `STANDARD_REQUEST_HEADERS,\!myBangHeader`.
1393
+
The header named `!myBangHeader` is now mapped.
1401
1394
1402
1395
NOTE: Starting with _version 5.1_, the `DefaultAmqpHeaderMapper` will fall back to mapping `MessageHeaders.ID` and `MessageHeaders.TIMESTAMP` to `MessageProperties.messageId` and `MessageProperties.timestamp` respectively, if the corresponding `amqp_messageId` or `amqp_timestamp` headers are not present on outbound messages.
1403
1396
Inbound properties will be mapped to the `amqp_*` headers as before.
@@ -1407,7 +1400,7 @@ It is useful to populate the `messageId` property when message consumers are usi
1407
1400
==== contentType Header
1408
1401
1409
1402
Unlike other headers, the `AmqpHeaders.CONTENT_TYPE` is not prefixed with `amqp_`; this allows transparent passing of the contentType header across different technologies.
1410
-
E.g. an inbound HTTP message sent to a RabbitMQ queue.
1403
+
For example an inbound HTTP message sent to a RabbitMQ queue.
1411
1404
1412
1405
The `contentType` header is mapped to Spring AMQP's `MessageProperties.contentType` property and that is subsequently mapped to RabbitMQ's `content_type` property.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/changes-1.0-2.0.adoc
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,8 @@ See <<feed>> for more details.
118
118
119
119
[[new-other]]
120
120
==== Other Additions
121
-
Spring Integration adds a number of other features. This section describes them.
121
+
Spring Integration adds a number of other features.
122
+
This section describes them.
122
123
123
124
[[new-groovy]]
124
125
===== Groovy Support
@@ -165,7 +166,8 @@ We have also switched our build system to http://gradle.org/[Gradle].
165
166
==== New Spring Integration Samples
166
167
167
168
With Spring Integration 2.0, we have decoupled the samples from our main release distribution.
168
-
Please read the following blog to get more information: http://blog.springsource.com/2010/09/29/new-spring-integration-samples/[New Spring Integration Samples]. We have also created many new samples, including samples for every new adapter.
169
+
Please read the following blog to get more information: http://blog.springsource.com/2010/09/29/new-spring-integration-samples/[New Spring Integration Samples].
170
+
We have also created many new samples, including samples for every new adapter.
169
171
170
172
[[new-sts]]
171
173
==== Spring Tool Suite Visual Editor for Spring Integration
Copy file name to clipboardExpand all lines: src/reference/asciidoc/channel-adapter.adoc
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,8 @@ If you want the script to be checked on each poll, you would need to coordinate
147
147
====
148
148
149
149
See also the `cacheSeconds` property on the `ReloadableResourceBundleExpressionSource` when using the `<expression/>` sub-element.
150
-
For more information regarding expressions, see <<spel>>. For scripts, see <<groovy>> and <<scripting>>.
150
+
For more information regarding expressions, see <<spel>>.
151
+
For scripts, see <<groovy>> and <<scripting>>.
151
152
152
153
IMPORTANT: The `<int:inbound-channel-adapter/>` is endpoint starts a message flow by periodically triggering to poll some underlying `MessageSource`.
153
154
Since, at the time of polling, there is no message object, expressions and scripts do not have access to a root `Message`, so there are no payload or headers properties that are available in most other messaging SpEL expressions.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/channel.adoc
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -857,7 +857,8 @@ Instead, Spring Integration focuses on a single unified approach to configuring
857
857
What makes certain parts of the message flow synchronous or asynchronous is the type of Message Channel that has been configured within that flow.
858
858
That is one of the primary benefits of the message channel abstraction.
859
859
From the inception of the framework, we have always emphasized the need and the value of the message channel as a first-class citizen of the framework.
860
-
It is not just an internal, implicit realization of the EIP pattern. It is fully exposed as a configurable component to the end user.
860
+
It is not just an internal, implicit realization of the EIP pattern.
861
+
It is fully exposed as a configurable component to the end user.
861
862
So, the wire tap component is only responsible for performing the following tasks:
862
863
863
864
* Intercept a message flow by tapping into a channel (for example, `channelA`)
Copy file name to clipboardExpand all lines: src/reference/asciidoc/codec.adoc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -54,8 +54,8 @@ The second and third are used with the `MessageCodec`, which is initialized with
54
54
55
55
By default, Kryo delegates unknown Java types to its `FieldSerializer`.
56
56
Kryo also registers default serializers for each primitive type, along with `String`, `Collection`, and `Map`.
57
-
`FieldSerializer` uses reflection to navigate the object graph. A more efficient approach is to implement a custom
58
-
serializer that is aware of the object's structure and can directly serialize selected primitive fields.
57
+
`FieldSerializer` uses reflection to navigate the object graph.
58
+
A more efficient approach is to implement a custom serializer that is aware of the object's structure and can directly serialize selected primitive fields.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/endpoint.adoc
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,8 @@ The `receiveTimeout` property specifies the amount of time the poller should wai
149
149
For example, consider two options that seem similar on the surface but are actually quite different: The first has an interval trigger of 5 seconds and a receive timeout of 50 milliseconds, while the second has an interval trigger of 50 milliseconds and a receive timeout of 5 seconds.
150
150
The first one may receive a message up to 4950 milliseconds later than it arrived on the channel (if that message arrived immediately after one of its poll calls returned).
151
151
On the other hand, the second configuration never misses a message by more than 50 milliseconds.
152
-
The difference is that the second option requires a thread to wait. However, as a result, it can respond much more quickly to arriving messages.
152
+
The difference is that the second option requires a thread to wait.
153
+
However, as a result, it can respond much more quickly to arriving messages.
153
154
This technique, known as "`long polling`", can be used to emulate event-driven behavior on a polled source.
154
155
155
156
A polling consumer can also delegate to a Spring `TaskExecutor`, as the following example shows:
@@ -770,7 +771,8 @@ public Map<String, Boolean> getEndpointsRunningStatus(String role) <4>
770
771
771
772
<3> Returns `true` if none of the endpoints in the role are running.
772
773
773
-
<4> Returns a map of `component name : running status`. The component name is usually the bean name.
774
+
<4> Returns a map of `component name : running status`.
0 commit comments