Java Outbound Adaptor processing
up vote
1
down vote
favorite
I have created an application that adds inbound adaptors at run time for ftp servers and registers them for removing at a certain stage if needed, this app will pull a csv file from ftp server(s) and place it in my local in a folder having the name of the ftp server, so every server I add will have a separate local folder created and the csv file is saved in it, now this is accomplished smoothly, the second part is I want to change the format of that file and then send it back to the respective server, so basically I need to use outbound adaptor, in this case I would need to create outbound adaptors at run time at the same time when creating inbound adaptor or adding a server, this should be done through controller same as the inbound, I searched for possible solutions and tried a one that is below but did not work or did not perform any sending of files to destination, any solution on how I can accomplish this?
In the configuration class I added the below:
public IntegrationFlow ftpOutboundFlow(Branch myBranch){
return IntegrationFlows.from(OUTBOUND_CHANNEL)
.handle(Ftp.outboundAdapter(createNewFtpSessionFactory(myBranch), FileExistsMode.FAIL)
.useTemporaryFileName(true)
.remoteFileSeparator("/")
//.fileNameExpression("BEY/FEFOexportBEY.csv")
.remoteDirectory(myBranch.getFolderPath()))
.get();
}
@MessagingGateway
public interface MyGateway {
@Gateway(requestChannel = OUTBOUND_CHANNEL)
void sendToFtp(File file);
}
@Bean
public IntegrationFlow ftpOutboundChannel() {
return IntegrationFlows.from(OUTBOUND_CHANNEL)
.publishSubscribeChannel(p -> p
.subscribe(t -> t.handle(System.out::println)))
/*.transform(p -> {
LOG.info("Outbound intermediate Channel, message=rename file:" + p);
return p;
})*/
.channel(new NullChannel())
.get();
}
And in the Controller class
@RequestMapping("/branch/showbranch/{id}")
public String getBranch (@PathVariable String id, Model model){
model.addAttribute("branch", branchService.getById(Long.valueOf(id)));
addFlowftp(id);
addFlowftpOutbound(id);
return "/branch/showbranch";
}
private void addFlowFtp(String name) {
branch = branchService.getById(Long.valueOf(name));
System.out.println(branch.getBranchCode());
IntegrationFlow flow = ftIntegration.fileInboundFlowFromFTPServer(branch);
this.flowContext.registration(flow).id(name).register();
}
private void addFlowftpOutbound(String name) {
branch = branchService.getById(Long.valueOf(name));
System.out.println(branch.getBranchCode());
IntegrationFlow flow = ftIntegration.ftpOutboundFlow(branch);
// this.flowContext.registration(flow).id(name).register();
myGateway.sendToFtp(new File("BEY/FEFOexportBEY.csv"));
}
Here is what I get in the consol as error when I enable the register before sending the file:
java.lang.IllegalArgumentException: An IntegrationFlow 'IntegrationFlowRegistration{integrationFlow=StandardIntegrationFlow{integrationComponents={org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer@aadab28=98.org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer#0, org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean@aa290b3=stockInboundPoller, org.springframework.integration.transformer.MethodInvokingTransformer@e5f85cd=98.org.springframework.integration.transformer.MethodInvokingTransformer#0, 98.channel#0=98.channel#0, org.springframework.integration.config.ConsumerEndpointFactoryBean@319dff2=98.org.springframework.integration.config.ConsumerEndpointFactoryBean#0}}, id='98', inputChannel=null}' with flowId '98' is already registered.
An existing IntegrationFlowRegistration must be destroyed before overriding.
After my second trial where I removed the registration from the first method and only tried with the second method but nothing was sent to the FTP:
GenericMessage [payload=BEYFEFOexportBEY.csv, headers={id=43cfc2db-41e9-0866-8e4c-8e95968189ff, timestamp=1542702869007}]
2018-11-20 10:34:29.011 INFO 13716 --- [nio-8081-exec-6] f.s.s.configuration.FTIntegration : Outbound intermediate Channel, message=rename file:BEYFEFOexportBEY.csv
spring spring-integration
add a comment |
up vote
1
down vote
favorite
I have created an application that adds inbound adaptors at run time for ftp servers and registers them for removing at a certain stage if needed, this app will pull a csv file from ftp server(s) and place it in my local in a folder having the name of the ftp server, so every server I add will have a separate local folder created and the csv file is saved in it, now this is accomplished smoothly, the second part is I want to change the format of that file and then send it back to the respective server, so basically I need to use outbound adaptor, in this case I would need to create outbound adaptors at run time at the same time when creating inbound adaptor or adding a server, this should be done through controller same as the inbound, I searched for possible solutions and tried a one that is below but did not work or did not perform any sending of files to destination, any solution on how I can accomplish this?
In the configuration class I added the below:
public IntegrationFlow ftpOutboundFlow(Branch myBranch){
return IntegrationFlows.from(OUTBOUND_CHANNEL)
.handle(Ftp.outboundAdapter(createNewFtpSessionFactory(myBranch), FileExistsMode.FAIL)
.useTemporaryFileName(true)
.remoteFileSeparator("/")
//.fileNameExpression("BEY/FEFOexportBEY.csv")
.remoteDirectory(myBranch.getFolderPath()))
.get();
}
@MessagingGateway
public interface MyGateway {
@Gateway(requestChannel = OUTBOUND_CHANNEL)
void sendToFtp(File file);
}
@Bean
public IntegrationFlow ftpOutboundChannel() {
return IntegrationFlows.from(OUTBOUND_CHANNEL)
.publishSubscribeChannel(p -> p
.subscribe(t -> t.handle(System.out::println)))
/*.transform(p -> {
LOG.info("Outbound intermediate Channel, message=rename file:" + p);
return p;
})*/
.channel(new NullChannel())
.get();
}
And in the Controller class
@RequestMapping("/branch/showbranch/{id}")
public String getBranch (@PathVariable String id, Model model){
model.addAttribute("branch", branchService.getById(Long.valueOf(id)));
addFlowftp(id);
addFlowftpOutbound(id);
return "/branch/showbranch";
}
private void addFlowFtp(String name) {
branch = branchService.getById(Long.valueOf(name));
System.out.println(branch.getBranchCode());
IntegrationFlow flow = ftIntegration.fileInboundFlowFromFTPServer(branch);
this.flowContext.registration(flow).id(name).register();
}
private void addFlowftpOutbound(String name) {
branch = branchService.getById(Long.valueOf(name));
System.out.println(branch.getBranchCode());
IntegrationFlow flow = ftIntegration.ftpOutboundFlow(branch);
// this.flowContext.registration(flow).id(name).register();
myGateway.sendToFtp(new File("BEY/FEFOexportBEY.csv"));
}
Here is what I get in the consol as error when I enable the register before sending the file:
java.lang.IllegalArgumentException: An IntegrationFlow 'IntegrationFlowRegistration{integrationFlow=StandardIntegrationFlow{integrationComponents={org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer@aadab28=98.org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer#0, org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean@aa290b3=stockInboundPoller, org.springframework.integration.transformer.MethodInvokingTransformer@e5f85cd=98.org.springframework.integration.transformer.MethodInvokingTransformer#0, 98.channel#0=98.channel#0, org.springframework.integration.config.ConsumerEndpointFactoryBean@319dff2=98.org.springframework.integration.config.ConsumerEndpointFactoryBean#0}}, id='98', inputChannel=null}' with flowId '98' is already registered.
An existing IntegrationFlowRegistration must be destroyed before overriding.
After my second trial where I removed the registration from the first method and only tried with the second method but nothing was sent to the FTP:
GenericMessage [payload=BEYFEFOexportBEY.csv, headers={id=43cfc2db-41e9-0866-8e4c-8e95968189ff, timestamp=1542702869007}]
2018-11-20 10:34:29.011 INFO 13716 --- [nio-8081-exec-6] f.s.s.configuration.FTIntegration : Outbound intermediate Channel, message=rename file:BEYFEFOexportBEY.csv
spring spring-integration
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have created an application that adds inbound adaptors at run time for ftp servers and registers them for removing at a certain stage if needed, this app will pull a csv file from ftp server(s) and place it in my local in a folder having the name of the ftp server, so every server I add will have a separate local folder created and the csv file is saved in it, now this is accomplished smoothly, the second part is I want to change the format of that file and then send it back to the respective server, so basically I need to use outbound adaptor, in this case I would need to create outbound adaptors at run time at the same time when creating inbound adaptor or adding a server, this should be done through controller same as the inbound, I searched for possible solutions and tried a one that is below but did not work or did not perform any sending of files to destination, any solution on how I can accomplish this?
In the configuration class I added the below:
public IntegrationFlow ftpOutboundFlow(Branch myBranch){
return IntegrationFlows.from(OUTBOUND_CHANNEL)
.handle(Ftp.outboundAdapter(createNewFtpSessionFactory(myBranch), FileExistsMode.FAIL)
.useTemporaryFileName(true)
.remoteFileSeparator("/")
//.fileNameExpression("BEY/FEFOexportBEY.csv")
.remoteDirectory(myBranch.getFolderPath()))
.get();
}
@MessagingGateway
public interface MyGateway {
@Gateway(requestChannel = OUTBOUND_CHANNEL)
void sendToFtp(File file);
}
@Bean
public IntegrationFlow ftpOutboundChannel() {
return IntegrationFlows.from(OUTBOUND_CHANNEL)
.publishSubscribeChannel(p -> p
.subscribe(t -> t.handle(System.out::println)))
/*.transform(p -> {
LOG.info("Outbound intermediate Channel, message=rename file:" + p);
return p;
})*/
.channel(new NullChannel())
.get();
}
And in the Controller class
@RequestMapping("/branch/showbranch/{id}")
public String getBranch (@PathVariable String id, Model model){
model.addAttribute("branch", branchService.getById(Long.valueOf(id)));
addFlowftp(id);
addFlowftpOutbound(id);
return "/branch/showbranch";
}
private void addFlowFtp(String name) {
branch = branchService.getById(Long.valueOf(name));
System.out.println(branch.getBranchCode());
IntegrationFlow flow = ftIntegration.fileInboundFlowFromFTPServer(branch);
this.flowContext.registration(flow).id(name).register();
}
private void addFlowftpOutbound(String name) {
branch = branchService.getById(Long.valueOf(name));
System.out.println(branch.getBranchCode());
IntegrationFlow flow = ftIntegration.ftpOutboundFlow(branch);
// this.flowContext.registration(flow).id(name).register();
myGateway.sendToFtp(new File("BEY/FEFOexportBEY.csv"));
}
Here is what I get in the consol as error when I enable the register before sending the file:
java.lang.IllegalArgumentException: An IntegrationFlow 'IntegrationFlowRegistration{integrationFlow=StandardIntegrationFlow{integrationComponents={org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer@aadab28=98.org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer#0, org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean@aa290b3=stockInboundPoller, org.springframework.integration.transformer.MethodInvokingTransformer@e5f85cd=98.org.springframework.integration.transformer.MethodInvokingTransformer#0, 98.channel#0=98.channel#0, org.springframework.integration.config.ConsumerEndpointFactoryBean@319dff2=98.org.springframework.integration.config.ConsumerEndpointFactoryBean#0}}, id='98', inputChannel=null}' with flowId '98' is already registered.
An existing IntegrationFlowRegistration must be destroyed before overriding.
After my second trial where I removed the registration from the first method and only tried with the second method but nothing was sent to the FTP:
GenericMessage [payload=BEYFEFOexportBEY.csv, headers={id=43cfc2db-41e9-0866-8e4c-8e95968189ff, timestamp=1542702869007}]
2018-11-20 10:34:29.011 INFO 13716 --- [nio-8081-exec-6] f.s.s.configuration.FTIntegration : Outbound intermediate Channel, message=rename file:BEYFEFOexportBEY.csv
spring spring-integration
I have created an application that adds inbound adaptors at run time for ftp servers and registers them for removing at a certain stage if needed, this app will pull a csv file from ftp server(s) and place it in my local in a folder having the name of the ftp server, so every server I add will have a separate local folder created and the csv file is saved in it, now this is accomplished smoothly, the second part is I want to change the format of that file and then send it back to the respective server, so basically I need to use outbound adaptor, in this case I would need to create outbound adaptors at run time at the same time when creating inbound adaptor or adding a server, this should be done through controller same as the inbound, I searched for possible solutions and tried a one that is below but did not work or did not perform any sending of files to destination, any solution on how I can accomplish this?
In the configuration class I added the below:
public IntegrationFlow ftpOutboundFlow(Branch myBranch){
return IntegrationFlows.from(OUTBOUND_CHANNEL)
.handle(Ftp.outboundAdapter(createNewFtpSessionFactory(myBranch), FileExistsMode.FAIL)
.useTemporaryFileName(true)
.remoteFileSeparator("/")
//.fileNameExpression("BEY/FEFOexportBEY.csv")
.remoteDirectory(myBranch.getFolderPath()))
.get();
}
@MessagingGateway
public interface MyGateway {
@Gateway(requestChannel = OUTBOUND_CHANNEL)
void sendToFtp(File file);
}
@Bean
public IntegrationFlow ftpOutboundChannel() {
return IntegrationFlows.from(OUTBOUND_CHANNEL)
.publishSubscribeChannel(p -> p
.subscribe(t -> t.handle(System.out::println)))
/*.transform(p -> {
LOG.info("Outbound intermediate Channel, message=rename file:" + p);
return p;
})*/
.channel(new NullChannel())
.get();
}
And in the Controller class
@RequestMapping("/branch/showbranch/{id}")
public String getBranch (@PathVariable String id, Model model){
model.addAttribute("branch", branchService.getById(Long.valueOf(id)));
addFlowftp(id);
addFlowftpOutbound(id);
return "/branch/showbranch";
}
private void addFlowFtp(String name) {
branch = branchService.getById(Long.valueOf(name));
System.out.println(branch.getBranchCode());
IntegrationFlow flow = ftIntegration.fileInboundFlowFromFTPServer(branch);
this.flowContext.registration(flow).id(name).register();
}
private void addFlowftpOutbound(String name) {
branch = branchService.getById(Long.valueOf(name));
System.out.println(branch.getBranchCode());
IntegrationFlow flow = ftIntegration.ftpOutboundFlow(branch);
// this.flowContext.registration(flow).id(name).register();
myGateway.sendToFtp(new File("BEY/FEFOexportBEY.csv"));
}
Here is what I get in the consol as error when I enable the register before sending the file:
java.lang.IllegalArgumentException: An IntegrationFlow 'IntegrationFlowRegistration{integrationFlow=StandardIntegrationFlow{integrationComponents={org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer@aadab28=98.org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer#0, org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean@aa290b3=stockInboundPoller, org.springframework.integration.transformer.MethodInvokingTransformer@e5f85cd=98.org.springframework.integration.transformer.MethodInvokingTransformer#0, 98.channel#0=98.channel#0, org.springframework.integration.config.ConsumerEndpointFactoryBean@319dff2=98.org.springframework.integration.config.ConsumerEndpointFactoryBean#0}}, id='98', inputChannel=null}' with flowId '98' is already registered.
An existing IntegrationFlowRegistration must be destroyed before overriding.
After my second trial where I removed the registration from the first method and only tried with the second method but nothing was sent to the FTP:
GenericMessage [payload=BEYFEFOexportBEY.csv, headers={id=43cfc2db-41e9-0866-8e4c-8e95968189ff, timestamp=1542702869007}]
2018-11-20 10:34:29.011 INFO 13716 --- [nio-8081-exec-6] f.s.s.configuration.FTIntegration : Outbound intermediate Channel, message=rename file:BEYFEFOexportBEY.csv
spring spring-integration
spring spring-integration
edited Nov 20 at 8:55
asked Nov 19 at 8:09
Elias Khattar
256
256
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
You need to perform this.flowContext.registration(flow).id(name).register();
before sending the file via myGateway.sendToFtp(new File("BEY/FEFOexportBEY.csv"));
.
That's first.
Other concern I see in your code that you have a ftpOutboundChannel
bean for an IntegrationFlow
which is subscribed to the same OUTBOUND_CHANNEL
. If that one is not declared as a PublishSubscribeChannel
, then you'll end up with the round-robin distribution. And I believe you would like to have file sent to the FTP and logged. So, indeed you need to declare that channel as a PublishSubscribeChannel
.
You don't have any error because that OUTBOUND_CHANNEL
has your ftpOutboundChannel
IntegrationFlow
as subscriber.
Thanks for the help, If I enable this.flowContext.registration(flow).id(name).register(); it is telling that the id is already registered when I add a new FTP server, this is because I have a method called addFlowFtp that is registering the server when adding it for inbound flow, so not able to do it twice, any solution for that? I updated the code as well to show the other method, I also updated method ftpOutboundChannel() to have PublishSubscribeChannel, can you please let me know that is fine now as well? some how new with Spring Integration
– Elias Khattar
Nov 20 at 8:09
I tried as well to comment the registration in the first method and ran the app, then tried to add a branch, it did not FTP the csv file to destination folder, it did not do anything, I updated at the end of the coding above with the new consol that I got@Artem Bilan
– Elias Khattar
Nov 20 at 8:53
Can you please help as well here @Gary Russell
– Elias Khattar
Nov 20 at 19:09
YourOUTBOUND_CHANNEL
is not aPublishSubscribeChannel
yet, so yourftpOutboundChannel()
still wins to get a message from the gateway.
– Artem Bilan
Nov 20 at 19:13
Is there any example where I reference and sort my issue out?cause I'm not sure how I can make my OUTBOUND_CHANNEL as PublishSubscribeChannel although I have added it in ftpOutboundChannel()...@Artem Bilan
– Elias Khattar
Nov 20 at 19:36
|
show 11 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
You need to perform this.flowContext.registration(flow).id(name).register();
before sending the file via myGateway.sendToFtp(new File("BEY/FEFOexportBEY.csv"));
.
That's first.
Other concern I see in your code that you have a ftpOutboundChannel
bean for an IntegrationFlow
which is subscribed to the same OUTBOUND_CHANNEL
. If that one is not declared as a PublishSubscribeChannel
, then you'll end up with the round-robin distribution. And I believe you would like to have file sent to the FTP and logged. So, indeed you need to declare that channel as a PublishSubscribeChannel
.
You don't have any error because that OUTBOUND_CHANNEL
has your ftpOutboundChannel
IntegrationFlow
as subscriber.
Thanks for the help, If I enable this.flowContext.registration(flow).id(name).register(); it is telling that the id is already registered when I add a new FTP server, this is because I have a method called addFlowFtp that is registering the server when adding it for inbound flow, so not able to do it twice, any solution for that? I updated the code as well to show the other method, I also updated method ftpOutboundChannel() to have PublishSubscribeChannel, can you please let me know that is fine now as well? some how new with Spring Integration
– Elias Khattar
Nov 20 at 8:09
I tried as well to comment the registration in the first method and ran the app, then tried to add a branch, it did not FTP the csv file to destination folder, it did not do anything, I updated at the end of the coding above with the new consol that I got@Artem Bilan
– Elias Khattar
Nov 20 at 8:53
Can you please help as well here @Gary Russell
– Elias Khattar
Nov 20 at 19:09
YourOUTBOUND_CHANNEL
is not aPublishSubscribeChannel
yet, so yourftpOutboundChannel()
still wins to get a message from the gateway.
– Artem Bilan
Nov 20 at 19:13
Is there any example where I reference and sort my issue out?cause I'm not sure how I can make my OUTBOUND_CHANNEL as PublishSubscribeChannel although I have added it in ftpOutboundChannel()...@Artem Bilan
– Elias Khattar
Nov 20 at 19:36
|
show 11 more comments
up vote
1
down vote
accepted
You need to perform this.flowContext.registration(flow).id(name).register();
before sending the file via myGateway.sendToFtp(new File("BEY/FEFOexportBEY.csv"));
.
That's first.
Other concern I see in your code that you have a ftpOutboundChannel
bean for an IntegrationFlow
which is subscribed to the same OUTBOUND_CHANNEL
. If that one is not declared as a PublishSubscribeChannel
, then you'll end up with the round-robin distribution. And I believe you would like to have file sent to the FTP and logged. So, indeed you need to declare that channel as a PublishSubscribeChannel
.
You don't have any error because that OUTBOUND_CHANNEL
has your ftpOutboundChannel
IntegrationFlow
as subscriber.
Thanks for the help, If I enable this.flowContext.registration(flow).id(name).register(); it is telling that the id is already registered when I add a new FTP server, this is because I have a method called addFlowFtp that is registering the server when adding it for inbound flow, so not able to do it twice, any solution for that? I updated the code as well to show the other method, I also updated method ftpOutboundChannel() to have PublishSubscribeChannel, can you please let me know that is fine now as well? some how new with Spring Integration
– Elias Khattar
Nov 20 at 8:09
I tried as well to comment the registration in the first method and ran the app, then tried to add a branch, it did not FTP the csv file to destination folder, it did not do anything, I updated at the end of the coding above with the new consol that I got@Artem Bilan
– Elias Khattar
Nov 20 at 8:53
Can you please help as well here @Gary Russell
– Elias Khattar
Nov 20 at 19:09
YourOUTBOUND_CHANNEL
is not aPublishSubscribeChannel
yet, so yourftpOutboundChannel()
still wins to get a message from the gateway.
– Artem Bilan
Nov 20 at 19:13
Is there any example where I reference and sort my issue out?cause I'm not sure how I can make my OUTBOUND_CHANNEL as PublishSubscribeChannel although I have added it in ftpOutboundChannel()...@Artem Bilan
– Elias Khattar
Nov 20 at 19:36
|
show 11 more comments
up vote
1
down vote
accepted
up vote
1
down vote
accepted
You need to perform this.flowContext.registration(flow).id(name).register();
before sending the file via myGateway.sendToFtp(new File("BEY/FEFOexportBEY.csv"));
.
That's first.
Other concern I see in your code that you have a ftpOutboundChannel
bean for an IntegrationFlow
which is subscribed to the same OUTBOUND_CHANNEL
. If that one is not declared as a PublishSubscribeChannel
, then you'll end up with the round-robin distribution. And I believe you would like to have file sent to the FTP and logged. So, indeed you need to declare that channel as a PublishSubscribeChannel
.
You don't have any error because that OUTBOUND_CHANNEL
has your ftpOutboundChannel
IntegrationFlow
as subscriber.
You need to perform this.flowContext.registration(flow).id(name).register();
before sending the file via myGateway.sendToFtp(new File("BEY/FEFOexportBEY.csv"));
.
That's first.
Other concern I see in your code that you have a ftpOutboundChannel
bean for an IntegrationFlow
which is subscribed to the same OUTBOUND_CHANNEL
. If that one is not declared as a PublishSubscribeChannel
, then you'll end up with the round-robin distribution. And I believe you would like to have file sent to the FTP and logged. So, indeed you need to declare that channel as a PublishSubscribeChannel
.
You don't have any error because that OUTBOUND_CHANNEL
has your ftpOutboundChannel
IntegrationFlow
as subscriber.
answered Nov 19 at 14:29
Artem Bilan
62.9k84668
62.9k84668
Thanks for the help, If I enable this.flowContext.registration(flow).id(name).register(); it is telling that the id is already registered when I add a new FTP server, this is because I have a method called addFlowFtp that is registering the server when adding it for inbound flow, so not able to do it twice, any solution for that? I updated the code as well to show the other method, I also updated method ftpOutboundChannel() to have PublishSubscribeChannel, can you please let me know that is fine now as well? some how new with Spring Integration
– Elias Khattar
Nov 20 at 8:09
I tried as well to comment the registration in the first method and ran the app, then tried to add a branch, it did not FTP the csv file to destination folder, it did not do anything, I updated at the end of the coding above with the new consol that I got@Artem Bilan
– Elias Khattar
Nov 20 at 8:53
Can you please help as well here @Gary Russell
– Elias Khattar
Nov 20 at 19:09
YourOUTBOUND_CHANNEL
is not aPublishSubscribeChannel
yet, so yourftpOutboundChannel()
still wins to get a message from the gateway.
– Artem Bilan
Nov 20 at 19:13
Is there any example where I reference and sort my issue out?cause I'm not sure how I can make my OUTBOUND_CHANNEL as PublishSubscribeChannel although I have added it in ftpOutboundChannel()...@Artem Bilan
– Elias Khattar
Nov 20 at 19:36
|
show 11 more comments
Thanks for the help, If I enable this.flowContext.registration(flow).id(name).register(); it is telling that the id is already registered when I add a new FTP server, this is because I have a method called addFlowFtp that is registering the server when adding it for inbound flow, so not able to do it twice, any solution for that? I updated the code as well to show the other method, I also updated method ftpOutboundChannel() to have PublishSubscribeChannel, can you please let me know that is fine now as well? some how new with Spring Integration
– Elias Khattar
Nov 20 at 8:09
I tried as well to comment the registration in the first method and ran the app, then tried to add a branch, it did not FTP the csv file to destination folder, it did not do anything, I updated at the end of the coding above with the new consol that I got@Artem Bilan
– Elias Khattar
Nov 20 at 8:53
Can you please help as well here @Gary Russell
– Elias Khattar
Nov 20 at 19:09
YourOUTBOUND_CHANNEL
is not aPublishSubscribeChannel
yet, so yourftpOutboundChannel()
still wins to get a message from the gateway.
– Artem Bilan
Nov 20 at 19:13
Is there any example where I reference and sort my issue out?cause I'm not sure how I can make my OUTBOUND_CHANNEL as PublishSubscribeChannel although I have added it in ftpOutboundChannel()...@Artem Bilan
– Elias Khattar
Nov 20 at 19:36
Thanks for the help, If I enable this.flowContext.registration(flow).id(name).register(); it is telling that the id is already registered when I add a new FTP server, this is because I have a method called addFlowFtp that is registering the server when adding it for inbound flow, so not able to do it twice, any solution for that? I updated the code as well to show the other method, I also updated method ftpOutboundChannel() to have PublishSubscribeChannel, can you please let me know that is fine now as well? some how new with Spring Integration
– Elias Khattar
Nov 20 at 8:09
Thanks for the help, If I enable this.flowContext.registration(flow).id(name).register(); it is telling that the id is already registered when I add a new FTP server, this is because I have a method called addFlowFtp that is registering the server when adding it for inbound flow, so not able to do it twice, any solution for that? I updated the code as well to show the other method, I also updated method ftpOutboundChannel() to have PublishSubscribeChannel, can you please let me know that is fine now as well? some how new with Spring Integration
– Elias Khattar
Nov 20 at 8:09
I tried as well to comment the registration in the first method and ran the app, then tried to add a branch, it did not FTP the csv file to destination folder, it did not do anything, I updated at the end of the coding above with the new consol that I got@Artem Bilan
– Elias Khattar
Nov 20 at 8:53
I tried as well to comment the registration in the first method and ran the app, then tried to add a branch, it did not FTP the csv file to destination folder, it did not do anything, I updated at the end of the coding above with the new consol that I got@Artem Bilan
– Elias Khattar
Nov 20 at 8:53
Can you please help as well here @Gary Russell
– Elias Khattar
Nov 20 at 19:09
Can you please help as well here @Gary Russell
– Elias Khattar
Nov 20 at 19:09
Your
OUTBOUND_CHANNEL
is not a PublishSubscribeChannel
yet, so your ftpOutboundChannel()
still wins to get a message from the gateway.– Artem Bilan
Nov 20 at 19:13
Your
OUTBOUND_CHANNEL
is not a PublishSubscribeChannel
yet, so your ftpOutboundChannel()
still wins to get a message from the gateway.– Artem Bilan
Nov 20 at 19:13
Is there any example where I reference and sort my issue out?cause I'm not sure how I can make my OUTBOUND_CHANNEL as PublishSubscribeChannel although I have added it in ftpOutboundChannel()...@Artem Bilan
– Elias Khattar
Nov 20 at 19:36
Is there any example where I reference and sort my issue out?cause I'm not sure how I can make my OUTBOUND_CHANNEL as PublishSubscribeChannel although I have added it in ftpOutboundChannel()...@Artem Bilan
– Elias Khattar
Nov 20 at 19:36
|
show 11 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53370579%2fjava-outbound-adaptor-processing%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown