Announcement Announcement Module
Collapse
No announcement yet.
FTP Handler Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • FTP Handler

    Hi,

    Just to summarize my understanding a bit, I configured an FTPSource adapter to retrieve files from our FTP server i.e. I configured a adapter and a channel to listen to that adapter....which worked fine no issues...

    I also wrote a message endpoint (MessageHandler if my understanding is correct) which listens on that channel like this just to see if it gets invoked by the message bus but it doesnt...so was wondering how would this thing work ? Any help would be appreciated..Thanks in advance

    This is my message endpoint

    Code:
    @MessageEndpoint(input="ftpChannel")
    public class FCPBFTPEndPoint {
        private static final Logger LOGGER = 
           Logger.getLogger(FCPBFTPEndPoint.class);
    
        @Handler
        public void handleFtp(Message message){
            LOGGER.debug("getting into this");
            LOGGER.debug("This message is" +message);
        }
    }
    This is my xml configuration
    Code:
        <message-bus/>
        <channel id="ftpChannel"/>
        <annotation-driven />

  • #2
    It looks like you are very close.

    You just need to be sure that a bean definition is created for your endpoint. There are two ways you can do this: 1) use a <bean /> element or 2) define a <component-scan/> element that refers to a base-package containing that class (see the "cafeDemo.xml" in spring-integration-samples for an example of the latter).

    Hope that helps.
    -Mark

    Comment

    Working...
    X