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/chain.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -121,7 +121,7 @@ In this case, it is 'somethingChain$child#1'.
121
121
Note, this transformer is not registered as a bean within the application context, so it does not get a `beanName`.
122
122
However its `componentName` has a value that is useful for logging and other purposes.
123
123
124
-
The `id` attribute for `<chain>` elements lets them be eligible for <<./jmx.adoc#jmx-mbean-exporter,,JMX export>>, and they are trackable in the <<./message-history.adoc#message-history,,message history>>.
124
+
The `id` attribute for `<chain>` elements lets them be eligible for <<./jmx.adoc#jmx-mbean-exporter,JMX export>>, and they are trackable in the <<./message-history.adoc#message-history,message history>>.
125
125
You can access them from the `BeanFactory` by using the appropriate bean name, as discussed earlier.
126
126
127
127
TIP: It is useful to provide an explicit `id` attribute on `<chain>` elements to simplify the identification of sub-components in logs and to provide access to them from the `BeanFactory` etc.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/configuration.adoc
+3-3
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ The next section describes what happens if exceptions occur within the asynchron
152
152
[[namespace-errorhandler]]
153
153
=== Error Handling
154
154
155
-
As described in the <<./overview.adoc#overview,,overview>> at the very beginning of this manual, one of the main motivations behind a message-oriented framework such as Spring Integration is to promote loose coupling between components.
155
+
As described in the <<./overview.adoc#overview,overview>> at the very beginning of this manual, one of the main motivations behind a message-oriented framework such as Spring Integration is to promote loose coupling between components.
156
156
The message channel plays an important role, in that producers and consumers do not have to know about each other.
157
157
However, the advantages also have some drawbacks.
158
158
Some things become more complicated in a loosely coupled environment, and one example is error handling.
@@ -210,7 +210,7 @@ Starting with version 4.3.10, Spring Integration provides the `ErrorMessagePubli
210
210
You can use them as a general mechanism for publishing `ErrorMessage` instances.
211
211
You can call or extend them in any error handling scenarios.
212
212
The `ErrorMessageSendingRecoverer` extends this class as a `RecoveryCallback` implementation that can be used with retry, such as the
The `ErrorMessageStrategy` is used to build an `ErrorMessage` based on the provided exception and an `AttributeAccessor` context.
215
215
It can be injected into any `MessageProducerSupport` or `MessagingGatewaySupport`.
216
216
The `requestMessage` is stored under `ErrorMessageUtils.INPUT_MESSAGE_CONTEXT_KEY` in the `AttributeAccessor` context.
@@ -415,7 +415,7 @@ The processing of these annotations creates the same beans as the corresponding
415
415
See <<annotations_on_beans>>.
416
416
The bean names are generated from the following pattern: `[componentName].[methodName].[decapitalizedAnnotationClassShortName]`
417
417
(for example, for the preceding example the bean name is `thingService.otherThing.serviceActivator`) for the `AbstractEndpoint` and the same name with an additional `.handler` (`.source`) suffix for the `MessageHandler` (`MessageSource`) bean.
418
-
The `MessageHandler` instances (`MessageSource` instances) are also eligible to be tracked by <<./message-history.adoc#message-history,, the message history>>.
418
+
The `MessageHandler` instances (`MessageSource` instances) are also eligible to be tracked by <<./message-history.adoc#message-history,the message history>>.
419
419
420
420
Starting with version 4.0, all messaging annotations provide `SmartLifecycle` options (`autoStartup` and `phase`) to allow endpoint lifecycle control on application context initialization.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/file.adoc
+3-3
Original file line number
Diff line number
Diff line change
@@ -608,7 +608,7 @@ By default, they append `.writing` to the file name and remove it when the trans
608
608
Another common technique is to write a second "`marker`" file to indicate that the file transfer is complete.
609
609
In this scenario, you should not consider `somefile.txt` (for example) to be available for use until `somefile.txt.complete` is also present.
610
610
Spring Integration version 5.0 introduced new filters to support this mechanism.
611
-
Implementations are provided for the file system (`FileSystemMarkerFilePresentFileListFilter`), <<./ftp.adoc#ftp-incomplete,, FTP>> and <<./sftp.adoc#sftp-incomplete,, SFTP>>.
611
+
Implementations are provided for the file system (`FileSystemMarkerFilePresentFileListFilter`), <<./ftp.adoc#ftp-incomplete,FTP>> and <<./sftp.adoc#sftp-incomplete,SFTP>>.
612
612
They are configurable such that the marker file can have any name, although it is usually related to the file being transferred.
613
613
See the https://docs.spring.io/spring-integration/api/org/springframework/integration/file/filters/FileSystemMarkerFilePresentFileListFilter.html[Javadoc] for more information.
614
614
@@ -950,7 +950,7 @@ It is often better to use a sequence of transformers than to put all transformat
950
950
In that case the `File` to `byte[]` conversion might be a logical first step.
951
951
952
952
`FileToStringTransformer` extends `AbstractFilePayloadTransformer` convert a `File` object to a `String`.
953
-
If nothing else, this can be useful for debugging (consider using it with a <<./channel.adoc#channel-wiretap,,wire tap>>).
953
+
If nothing else, this can be useful for debugging (consider using it with a <<./channel.adoc#channel-wiretap,wire tap>>).
954
954
955
955
To configure file-specific transformers, you can use the appropriate elements from the file namespace, as the following example shows:
956
956
@@ -1057,7 +1057,7 @@ This line is not included in the sequence header (if `applySequence` is true) no
1057
1057
If a file contains only the header line, the file is treated as empty and, therefore, only `FileMarker` instances are emitted during splitting (if markers are enabled -- otherwise, no messages are emitted).
1058
1058
By default (if no header name is set), the first line is considered to be data and becomes the payload of the first emitted message.
1059
1059
1060
-
If you need more complex logic about header extraction from the file content (not first line, not the whole content of the line, not one particular header, and so on), consider using <<./content-enrichment.adoc#header-enricher,, header enricher>> ahead of the `FileSplitter`.
1060
+
If you need more complex logic about header extraction from the file content (not first line, not the whole content of the line, not one particular header, and so on), consider using <<./content-enrichment.adoc#header-enricher,header enricher>> ahead of the `FileSplitter`.
1061
1061
Note that the lines that have been moved to the headers might be filtered downstream from the normal content process.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/ftp.adoc
+5-5
Original file line number
Diff line number
Diff line change
@@ -354,7 +354,7 @@ The default `MetadataStore` is a `SimpleMetadataStore`, which stores state in me
354
354
Since version 4.1.5, these filters have a new property (`flushOnUpdate`) that causes them to flush the
355
355
metadata store on every update (if the store implements `Flushable`).
356
356
357
-
IMPORTANT: Further, if you use a distributed `MetadataStore` (such as <<./redis.adoc#redis-metadata-store,,Redis>> or <<./gemfire.adoc#gemfire-metadata-store,,GemFire>>), you can have multiple instances of the same adapter or application and be sure that each file is processed only once.
357
+
IMPORTANT: Further, if you use a distributed `MetadataStore` (such as <<./redis.adoc#redis-metadata-store,Redis>> or <<./gemfire.adoc#gemfire-metadata-store,GemFire>>), you can have multiple instances of the same adapter or application and be sure that each file is processed only once.
358
358
359
359
The actual local filter is a `CompositeFileListFilter` that contains the supplied filter and a pattern filter that prevents processing files that are in the process of being downloaded (based on the `temporary-file-suffix`).
360
360
Files are downloaded with this suffix (the default is `.writing`), and the file is renamed to its final name when the transfer is complete, making it 'visible' to the filter.
@@ -805,7 +805,7 @@ When all files are consumed, the remote fetch is attempted again, to pick up any
805
805
IMPORTANT: When you deploy multiple instances of an application, we recommend a small `max-fetch-size`, to avoid one instance "`grabbing`" all the files and starving other instances.
806
806
807
807
Another use for `max-fetch-size` is if you want to stop fetching remote files but continue to process files that have already been fetched.
808
-
Setting the `maxFetchSize` property on the `MessageSource` (programmatically, with JMX, or with a <<./control-bus.adoc#control-bus,,control bus>>) effectively stops the adapter from fetching more files but lets the poller continue to emit messages for files that have previously been fetched.
808
+
Setting the `maxFetchSize` property on the `MessageSource` (programmatically, with JMX, or with a <<./control-bus.adoc#control-bus,control bus>>) effectively stops the adapter from fetching more files but lets the poller continue to emit messages for files that have previously been fetched.
809
809
If the poller is active when the property is changed, the change takes effect on the next poll.
810
810
811
811
Starting with version 5.1, the synchronizer can be provided with a `Comparator<FTPFile>`.
@@ -1068,10 +1068,10 @@ The `file_remoteDirectory` header provides the remote directory name, and the `f
1068
1068
1069
1069
The message payload resulting from a `get` operation is a `File` object that represents the retrieved file or an `InputStream` when you use the `-stream` option.
1070
1070
The `-stream` option allows retrieving the file as a stream.
1071
-
For text files, a common use case is to combine this operation with a <<./file.adoc#file-splitter,,file splitter>> or a <<./transformer.adoc#stream-transformer,,stream transformer>>.
1071
+
For text files, a common use case is to combine this operation with a <<./file.adoc#file-splitter,file splitter>> or a <<./transformer.adoc#stream-transformer,stream transformer>>.
1072
1072
When consuming remote files as streams, you are responsible for closing the `Session` after the stream is consumed.
1073
1073
For convenience, the `Session` is provided in the `closeableResource` header, which you can access with a convenience method on `IntegrationMessageHeaderAccessor`
1074
-
The following example shows how to do use the covenience method:
1074
+
The following example shows how to use the convenience method:
1075
1075
1076
1076
====
1077
1077
[source, java]
@@ -1083,7 +1083,7 @@ if (closeable != null) {
1083
1083
----
1084
1084
====
1085
1085
1086
-
Framework components such as the <<./file.adoc#file-splitter,,file splitter>> and the <<./transformer.adoc#stream-transformer,,stream transformer>> automatically close the session after the data is transferred.
1086
+
Framework components such as the <<./file.adoc#file-splitter,file splitter>> and the <<./transformer.adoc#stream-transformer,stream transformer>> automatically close the session after the data is transferred.
1087
1087
1088
1088
The following example shows how to consume a file as a stream:
Copy file name to clipboardExpand all lines: src/reference/asciidoc/functions-support.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
4
4
Starting with version 5.1, Spring Integration provides direct support for interfaces in the `java.util.function` package.
5
5
All messaging endpoints, (Service Activator, Transformer, Filter, etc.) can now refer to `Function` (or `Consumer`) beans.
6
-
The <<./configuration.adoc#annotations,,Messaging Annotations>> can be applied directly on these beans similar to regular `MessageHandler` definitions.
6
+
The <<./configuration.adoc#annotations,Messaging Annotations>> can be applied directly on these beans similar to regular `MessageHandler` definitions.
7
7
For example if you have this `Function` bean definition:
Copy file name to clipboardExpand all lines: src/reference/asciidoc/gateway.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ It lets you configure an interface as a service, as the following example shows:
46
46
47
47
With this configuration defined, the `cafeService` can now be injected into other beans, and the code that invokes the methods on that proxied instance of the `Cafe` interface has no awareness of the Spring Integration API.
48
48
The general approach is similar to that of Spring Remoting (RMI, HttpInvoker, and so on).
49
-
See the <<./samples.adoc#samples,,"`Samples`">> Appendix for an example that uses the `gateway` element (in the Cafe demo).
49
+
See the <<./samples.adoc#samples,"`Samples`">> Appendix for an example that uses the `gateway` element (in the Cafe demo).
50
50
51
51
The defaults in the preceding configuration are applied to all methods on the gateway interface.
52
52
If a reply timeout is not specified, the calling thread waits indefinitely for a reply.
@@ -79,7 +79,7 @@ By defining a `default-reply-channel` you can point to a channel of your choosin
79
79
In this case, that is a `publish-subscribe-channel`.
80
80
The gateway creates a bridge from it to the temporary, anonymous reply channel that is stored in the header.
81
81
82
-
You might also want to explicitly provide a reply channel for monitoring or auditing through an interceptor (for example, <<./channel.adoc#channel-wiretap,, wiretap>>).
82
+
You might also want to explicitly provide a reply channel for monitoring or auditing through an interceptor (for example, <<./channel.adoc#channel-wiretap,wiretap>>).
83
83
To configure a channel interceptor, you need a named channel.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/handler-advice.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -682,9 +682,9 @@ The following example shows `<transactional>` in use:
682
682
</bean>
683
683
----
684
684
685
-
If you are familiar with the <<./jpa.adoc#jpa,, JPA integration components>>, such a configuration is not new, but now we can start a transaction from any point in our flow -- not only from the `<poller>` or a message-driven channel adapter such as <<./jms.adoc#jms-message-driven-channel-adapter,, JMS>>.
685
+
If you are familiar with the <<./jpa.adoc#jpa,JPA integration components>>, such a configuration is not new, but now we can start a transaction from any point in our flow -- not only from the `<poller>` or a message-driven channel adapter such as <<./jms.adoc#jms-message-driven-channel-adapter,JMS>>.
686
686
687
-
Java configuration can be simplified by using the `TransactionInterceptorBuilder`, and the result bean name can be used in the <<./configuration.adoc#annotations,, messaging annotations>> `adviceChain` attribute, as the following example shows:
687
+
Java configuration can be simplified by using the `TransactionInterceptorBuilder`, and the result bean name can be used in the <<./configuration.adoc#annotations,messaging annotations>> `adviceChain` attribute, as the following example shows:
Copy file name to clipboardExpand all lines: src/reference/asciidoc/ip.adoc
+2-2
Original file line number
Diff line number
Diff line change
@@ -636,7 +636,7 @@ The following example shows how to configure a connection interceptor factory ch
636
636
=== TCP Connection Events
637
637
638
638
Beginning with version 3.0, changes to `TcpConnection` instances are reported by `TcpConnectionEvent` instances.
639
-
`TcpConnectionEvent` is a subclass of `ApplicationEvent` and can thus be received by any `ApplicationListener` defined in the `ApplicationContext` -- for example <<./event.adoc#appevent-inbound,,an event inbound channel adapter>>.
639
+
`TcpConnectionEvent` is a subclass of `ApplicationEvent` and can thus be received by any `ApplicationListener` defined in the `ApplicationContext` -- for example <<./event.adoc#appevent-inbound,an event inbound channel adapter>>.
640
640
641
641
`TcpConnectionEvents` have the following properties:
642
642
@@ -743,7 +743,7 @@ Two additional attributes support this mechanism.
743
743
The `retry-interval` specifies (in milliseconds) how often the framework attempts to reconnect after a connection failure.
744
744
The `scheduler` supplies a `TaskScheduler` to schedule the connection attempts and to test that the connection is still active.
745
745
746
-
If you don't provide a scheduler, the framework's default <<./configuration.adoc#namespace-taskscheduler,, taskScheduler>> bean is used.
746
+
If you don't provide a scheduler, the framework's default <<./configuration.adoc#namespace-taskscheduler,taskScheduler>> bean is used.
747
747
748
748
For an outbound adapter, the connection is normally established when the first message is sent.
749
749
The `client-mode="true"` on an outbound adapter causes the connection to be established when the adapter is started.
To configure these adapters to use the `JdbcMetadataStore`, declare a Spring bean by using a bean name of `metadataStore`.
1103
1103
The Feed inbound channel adapter and the feed inbound channel adapter both automatically pick up and use the declared `JdbcMetadataStore`, as the following example shows:
Copy file name to clipboardExpand all lines: src/reference/asciidoc/message-store.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Spring Integration provides support for the message store pattern by:
13
13
* Providing several implementations of this interface
14
14
* Exposing a `message-store` attribute on all components that have the capability to buffer messages so that you can inject any instance that implements the `MessageStore` interface.
15
15
16
-
Details on how to configure a specific message store implementation and how to inject a `MessageStore` implementation into a specific buffering component are described throughout the manual (see the specific component, such as <<./channel.adoc#channel-configuration-queuechannel,,QueueChannel>>, <<./aggregator.adoc#aggregator,,Aggregator>>, <<./delayer.adoc#delayer,,Delayer>>, and others).
16
+
Details on how to configure a specific message store implementation and how to inject a `MessageStore` implementation into a specific buffering component are described throughout the manual (see the specific component, such as <<./channel.adoc#channel-configuration-queuechannel,QueueChannel>>, <<./aggregator.adoc#aggregator,Aggregator>>, <<./delayer.adoc#delayer,Delayer>>, and others).
17
17
The following pair of examples show how to add a reference to a message store for a `QueueChannel` and for an aggregator:
0 commit comments