Questions tagged [spring-integration]
Use this tag for questions about the Spring Integration project. It is not intended for general questions about integrating other Spring projects with other technologies.
7,698
questions
0
votes
0
answers
13
views
How to get the flow back to current channel after output channel is processed in Spring Integration?
I have below channel defined in my spring integration xml.
<int:chain id="channel1" input-channel="inChannel" output-channel="outChannel">
1. <int:...
0
votes
0
answers
12
views
Is this ExecutorChannel getting all the tasks from the message channel?
One of my program for uploading files to cloud is terribly slow. I have used an executor service with 40 threads to upload files to aws cloud through one single client object. The code is below.
...
0
votes
1
answer
26
views
How to execute the download and processing in parallel for the Spring SFTP integration processing?
Cannot multithread on an inbound SFTP Spring integration.
Want the service activator to activate on a separate thread as soon as the poller picks a file . With the below code, the serviceactivator ...
1
vote
1
answer
22
views
Spring integration Tcp Server timeout with custom deserializer
I am declaring a Tcp inbound adapter to receive messages from a specific client, a hardware device that sends a custom payload. There isn't a default deserializer that fits my needs for the message ...
0
votes
1
answer
27
views
Stream cloud stream throws `MessageDispatchingException: Dispatcher has no subscribers` from time to time
I have a spring cloud stream application that consumes a Kafka topic and eventually update an ElasticSearch index. here is my code:
@Bean
public Consumer<Flux<Message<GraphTextKafkaRecord>&...
1
vote
2
answers
23
views
How could I delay the shutdown till all channels(spring-integration) are empty?
I have a spring boot application that loads files into a QueueChannel. From there an async ServiceActivator processes the file messages.
On application stop the shutdown should wait till all queued ...
0
votes
1
answer
14
views
Spring Integration 3 Parallel Independent WebFlux OutboundGateway Calls
Please suggest a pattern to make 3 parallel WebFlux OutboundGateway calls which have different request and response payloads. Is ScatterGather a good pattern for this usecase? Thanks
0
votes
1
answer
28
views
Spring Integration Async flow dsl
I'm using Spring integration in my code. Here I'm using scatter gather pattern and in the end I'm calling saveResponseAndGenerateApplicationResponse() flow. In the last flow I'm doing three operations ...
0
votes
1
answer
18
views
Spring Integration how to return back payload together with exception with advice?
We are using Spring Integration Split and Aggregate to parallel flow of sub messages for large request.
For error flow, would like the flow to handle the exception when all of the sub messages all ...
0
votes
0
answers
43
views
Why aggregator app encode messages in base64?
I'm trying to use the aggregator processor 2021.1.x with SCDF 2.9.6 and Kafka.
It aggregates the messages except I get a list of base64 encoded messages instead of json messages.
Something like :
[
...
0
votes
1
answer
25
views
Is there a way I send mail with all files (as Zip) received in Spring Integration FTP instead sending the files Individually per Message received
I have a Spring Boot application based on Spring Integration FTP where I can DOWNLOAD/UPLOAD files.
I need to send the files (as ZIP) received via mail but the problem is, I can only do this per ...
0
votes
1
answer
35
views
Why does TimeoutCountSequenceSizeReleaseStrategy of Spring Integration does not release messages when time has lapsed set by the user?
In my SpringBoot application I have written an aggregator as below. I want messages to be release immediately after 2 minutes has lapsed. But below code does not seem to work.
However, when release-...
0
votes
1
answer
25
views
Using Spring integration FTP client hangs after transfering the file in Docker
I'm using the following code in order to connect to a FTP server:
public void sendData(BepReport bpReport) {
FtpSession ftpSession = defaultFtpSessionFactory.getSession();
StringBuilder buffer = new ...
0
votes
1
answer
24
views
How to implement Spring Integration Flow to act as a TcpClient
I am trying to set up a Spring Integration Flow to act as a Tcp Client.
The Server is running on e.g. localhost:9026.
I first tried with simple Sockets, that worked.
I expected it to be much more ...
0
votes
1
answer
21
views
spring integration flow dsl performace is slow executing while reading from pubsub and saving into postgres
Below is the code that is reading from pubsub topic.
public IntegrationFlow processEvent() {
return IntegrationFlow.from(Consumer.class, gateway -> gateway.beanName("onMessage"))
...
0
votes
1
answer
12
views
Scatter-gather PublishSubscribe rollback on exception
I would like to create a scatter-gather that executes several handlers in separate transaction.
To do so, I assumed that the version with the PublishSubscribeChannel configured with a taskExecutor ...
1
vote
1
answer
41
views
How to test JPA adaptor steps in Spring Integration Flow
I have an integration flow (simplified version below) which has multiple steps with JPA adapter. With the first one, i'm getting the existing record from database with the id, and in the second one, ...
0
votes
2
answers
50
views
How to send message object to the API accepting Multipart file object?
I want to be able to send file to the api below, without physically creating the file
@PostMapping(value = "/receiveFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ...
1
vote
1
answer
25
views
Spring integation parallel split
I have code like this.
Is it possible to control ordering of first split?
` @Bean
public TaskExecutor taskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
...
1
vote
1
answer
32
views
Ignore specific path in Http.inboundGateway
I'm working on a Spring boot 2.7.7 + Spring integration application that works as a webservice proxy:
any URL fed to the webservice is converted to the URL of one of many third-party services ...
0
votes
1
answer
25
views
How does JdbcPollingChannelAdapter maxRows differs from Poller maxMessagesPerPoll?
I have multiple Polling flows using the same flow logic, but varying the channel (it's a database column id_channel to separate rows by dependence).
On the JdbcPollingChannelAdapter, setMaxRows is ...
0
votes
1
answer
42
views
How to know the the running status of a spring integration flow
I have a simple integration flow that poll data based on a cron job from database, publish on a DirectChannel, then do split and transformations, and publish on another executor service channel, do ...
0
votes
1
answer
17
views
Spring integration: how to specify a custom task executor for QueueChannel
I'm writing a Spring Integration application which receives messages from an input system, transforms them and sends them to an output system. The connection to the output system is not always ...
0
votes
1
answer
107
views
Replacement for SocketUtils.findAvailableTcpPort()?
The following initializes as socket with spring-integration on a dedicated port.
Goal is to give the application 2 minutes of time to run on that port, or fail is not successful. But the application ...
0
votes
1
answer
41
views
Spring boot SFTP service is failing with the error " Failed to list files; nested exception is 4"
Once in a while our SFTP service fails with below exception. But runs most of the time. On one particular server it fails every alternate days. Here is our code and exception: The code downloads the ...
0
votes
0
answers
36
views
Bean for message channel not found causes flaky integration test
We're experiencing flaky integration tests using Spring Integration Flow for e-mail sending.
We're using a @MessagingGateway for sending a MimeMessage to an integration flow.
@MessagingGateway
public ...
0
votes
1
answer
92
views
listing emails from gmail with spring boot
I want to retrieve all my emails from Gmail with spring
I found that spring integration provide a class named ImapMailReceiver
but this doesn't work
the documentation says that I have to add java ...
0
votes
1
answer
26
views
Spring Integration, Google Pubsub Auto ack not working
Following is an Spring IntegrationFlow i am trying to make work using Spring integration 6 and Google PubSub 1.123. However, AUTO acknowledgment is not working reason being the routeToRecpient is one ...
0
votes
1
answer
28
views
SftpOutboundGateway - pass localDirectory dynamically
I have the below code snippet to download a file from a remote server. I would like to update it to be more generic, so a directory where the file should be downloaded (localDirectory) could be passed ...
0
votes
1
answer
31
views
PublishSubscribeChannel having multiple subscribers and return value
I would like to understand how returning values work for PublishSubscribeChannel having multiple subscribers.
@Bean
public PublishSubscribeChannel channel(){
return new ...
0
votes
0
answers
10
views
Connecting 2 inbound gateway reply message channels
I have inbound gateway(ig1) which has reply channel(rep1) which has HTTP outbound gateway which calls one internal API and send response back to reply channel(rep1)
I have another inbound gateway(ig2) ...
1
vote
1
answer
50
views
Spring Integration MQTT - Not re-subscribing after reconnect
After the MQTTv5 client is reconnected successfully, it does not re-subscribe to the topics. I am unable to retrieve messages unless I reboot my application.
Spring Boot version: 3.0.2
MQTT ...
0
votes
0
answers
42
views
http outbound gateway PUT request 400 Bad Request [No Body]
<int:chain id="re-t-ob-chain" input-channel="testIntmChannel" output-channel="outputChannel">
<int:service-activator ref="testTransformer" method="...
0
votes
1
answer
29
views
Correct way to retry messages in batch in case of error in Spring Integration using ExpressionEvaluatingRequestHandlerAdvice
I am processing messages from batch.
Defined advice for MessageHandler
ExpressionEvaluatingRequestHandlerAdvice advice = new ExpressionEvaluatingRequestHandlerAdvice();
advice.setFailureChannelName(&...
0
votes
1
answer
23
views
How to make Spring Integrations jdbc inbound channel adapter to poll new data?
I have written jdbc inbound adapter as below
int-jdbc:inbound-channel-adapter id="jdbcInbound"
channel="channel"
...
0
votes
1
answer
58
views
Does Spring Integration's JDBC inbound channel adapter poll new records added the table?
I have written jdbcinboud channel adapter as below. I am using update query. however it is not working. The query retrieves two rows, but update statement does not set the accType of these two rows to ...
1
vote
1
answer
60
views
Spring Integration is not detecting files on FTP Folder
Currently I'm facing a problem where I don't know what to do to resolve it. I'm developing a simple application that transfer files through different FTP and SFTP servers to be processed. Well, at the ...
1
vote
1
answer
43
views
Spring Integration: How to send messages from pubsub subscribers to external systems/servers with Http Methods
I have been trying to send messages to external systems(using rest template POST, PUT etc) from the service activators as below.
Below is my pubsub consumer class
public class MyConsumer{
@...
0
votes
0
answers
40
views
Spring Integration DSL - OAuth2ErrorHandler issues with 4XX series error codes
We are using spring integration DSL to call downstream services. But we are facing issues when 4XX series error code is returned by downstream service.
Below is the code snippet that we are using to ...
0
votes
0
answers
84
views
Spring Integration SFTP Outbound Gateway replace file
What is wrong with this Config ? I am not able to overwrite an existing file in the sftp server location (new and old file name are the same). the directory has 777 as chmod too. I have added the ...
0
votes
1
answer
96
views
Spring Integration Error/Exception handling
I have started working with Spring Integration to send messages to external System using Spring Integration Google Pub/sub model.
I am sending the payload received by the Service activator as below
@...
0
votes
0
answers
110
views
SFTP polling is not working with Spring Integration 6.0.1
Hello I am using file poller with Spring Integration and we have recently migrated to Java 17. Spring Integration moved from 5.5.15 to 6.0.1
My old bean was:
@Bean
public SessionFactory<LsEntry&...
0
votes
1
answer
25
views
Spring integration - Gateway - Retry logging
I have a retry advice applied on a sftpOutboundGateway. I want to see in the logs whenever retries happen. how do I enable that ? is there some property in application.yml ?
0
votes
1
answer
34
views
Spring Integration ExecutorChannel running on Same Caller Thread
Need to process messages sequentially, irrespective of the spring.task.scheduling.pool.size threads defined. Hence, we defined a ExecutorChannel with single thread. However, we see the messages are ...
0
votes
1
answer
39
views
How to make Spring Integrations's Jdbc inbound-channel-adapter to start polling only after a certain event?
In my Spring boot application, I have written below to poll Data from DB .
The data is polled when the Spring boot application is started..
How can I start polling the data on some event?
<?xml ...
0
votes
1
answer
34
views
How to poll data from DB using Spring Integration's JdbcPollingChannelAdapter for a certain duration, pass it to a listener through a channel?
I want to poll 100 messages from DB every 120 seconds for which I have written following bean.
@Component
class AccountConfiguration {
@Autowired
@Qualifier("outChannel") // defined in ...
0
votes
1
answer
36
views
Retrieve latest modified zip files with Spring Integration
I've written an application that downloads files from a Sftp server. What I want to achieve is to download only ZIP files, but to download them only when they've been modified.
I've written a ...
0
votes
1
answer
19
views
Spring Integration TransactionSynchronizationFactory deleting file before Flow ends
Our TransactionSynchronizationFactory is deleting the source file even before the flow ends and this is causing a failure in the flow. After reading the file, we split(), make a WebClient Gateway call,...
0
votes
1
answer
36
views
Spring Integration preventDuplicates(false) not working
Given the code below, I would expect preventDuplicates(false) to allow files with the same name and size and last modification to be processed. However, the code still acts as it this flag is true in ...
1
vote
2
answers
40
views
Upload a xml file in spring integration using HttpRequestHandlingMessagingGateway
I am trying to upload a multipart form-data with an attached xml file to integration server.
I am using a HttpRequestHandlingMessagingGateway with a RequestMapping bean.
@Bean("...