Announcement Announcement Module
Collapse
No announcement yet.
potential memory leak in sftp:inbound-channel-adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • potential memory leak in sftp:inbound-channel-adapter

    HI,

    I have just recently started working with spring integration, so please bear with me .

    I have made a simple POC which uses two process: A producer (on one server) and A consumer (on another server).

    The consumer uses sftp:inbound-channel-adapter. The producer produces 200 files per second (messages).

    We could see that after ~100,000 messages the consumer slows down significantly and eventually cannot keep up with the producer.

    After looking at spring integration source code, I have seen that it uses an unbounded AcceptOnceFileListFilter (on the remote side) .

    This causing the queue to grow indefinably.

    Code:
    public abstract class AbstractInboundFileSynchronizingMessageSource<F> extends MessageProducerSupport implements MessageSource<File> {
    
    ..
    	@SuppressWarnings("unchecked")
    	private FileListFilter<File> buildFilter() {
    		Pattern completePattern = Pattern.compile("^.*(?<!" + this.synchronizer.getTemporaryFileSuffix() + ")$");
    		return new CompositeFileListFilter<File>(Arrays.asList(
    				new AcceptOnceFileListFilter<File>(),
    				new RegexPatternFileListFilter(completePattern)));
    	}

    Do I miss somthing?


    Many Thanks,
    Leon
Working...
X