Tags down


How to call a method in my integration flow

Date : October 14 2020, 02:24 PM
I hope this helps you . First of all your method reference definition is fully wrong in that .handle().
Anyway let's forget it for now!
code :
.handle(m -> this.cSVToCSVNoQ.writeCSVfinal(m.getPayload(), m.getHeaders().get(...)))

Share : facebook icon twitter icon

How do I return a value from a method in Spring Integration and not interrupt the original Message flow?

By : Bojo240
Date : March 29 2020, 07:55 AM
wish helps you What version of Spring Integration and Spring Framework are you using?
What does the signature of fileProcessor.encode() look like?
code :
private Message<?> createReplyMessage(Object reply, MessageHeaders requestHeaders) {
    AbstractIntegrationMessageBuilder<?> builder = null;
    if (reply instanceof Message<?>) {
        if (!this.shouldCopyRequestHeaders()) {
            return (Message<?>) reply;
        builder = this.getMessageBuilderFactory().fromMessage((Message<?>) reply);


    if (this.shouldCopyRequestHeaders()) {
    return builder.build();
boolean encode(File file) {...}
<int:header-enricher ...>
    <int:header name="origFile" expression="payload" />

How to configure a trigger in spring integration flow to get value from a method invoking message source?

By : lbdcck
Date : March 29 2020, 07:55 AM
I wish did fix the issue. How to configure a trigger in spring integration flow to get value from a method invoking message source and start it in another flow ? , The MessageSource has receive() method, so you can do just this:
code :
public MessageSource<?> randomIntSource() {
    MethodInvokingMessageSource source = new MethodInvokingMessageSource();
    source.setObject(new Random());
    return source;

public IntegrationFlow someOtherFlow() {
    return IntegrationFlows.from("messageChannel")
            .handle(randomIntSource(), "receive")

Spring Integration: call service when flow completes

By : Yishi Zhao
Date : March 29 2020, 07:55 AM
it helps some times If you talk about "when all the messages" after splitter, then you need to take a look into an .aggregate(): https://docs.spring.io/spring-integration/docs/5.0.3.RELEASE/reference/html/messaging-routing-chapter.html#aggregator.
The splitter populates special sequence details headers into each splitted item and an aggregator is able to gather them to a single entity by default using those headers from received message.

Handling a method in integration flow

By : Gdr-apriliomitchluck
Date : March 29 2020, 07:55 AM
I wish this helpful for you I have created an application that uses Spring MVC to add ftp servers through a web page. When I add a server with details, it will start a flow polling a directory on the sever for specific csv file, once that file is there it will pull it to my local folder then a method is created to read that csv file and generate a new csv that will be sent back to the server, now this is accomplished, my issue is that when I add a new ftp server to poll and it finds a csv file on the second server, the application is pulling that file to my local as it should do but the handling method is being triggered again for both csv files while it should only do so for the second server since it is already triggered for the first server, so when I add the second server then again another file for server 1 generated and sent back to ftp and new one for the second server is send to the second ftp, at the end I have two files sent to first serve and one file to the second server, below is the coding and the output consol of the app, please assist on pinpointing my issue.
code :
.addFilter(new FileSystemPersistentAcceptOnceFileListFilter(new SimpleMetadataStore(), "foo"))),

Execute a method after all messages are put to kafka in spring cloud integration flow after split

By : user042913
Date : March 29 2020, 07:55 AM
I wish this helpful for you Since you split and only after that send to the Kafka, there is no way to catch all of them, unless aggregate afterwards. You can do that with the publishSubscribeChannel to send to the Kafka and aggregator the same message. When aggregator releases a group, you are good to perform your method call.
Privacy Policy - Terms - Contact Us © voile276.org