Monday, May 21, 2018

Spring Integration Sucks

Here the whole tutorials site to git clone

If you use Eclipse, better to "git clone" separately and then Import, Existing Maven Project, and give the tutorials folder. Importing from Git seems not to work (Eclipse SUCKS, it's the most pathetic IDE in centuries).

This is the one interesting us

All is explained here (BasicIntegrationConfig in the github project is FileCopyConfig)

My first impression is of an extreme complication and non elegant API design. You have to wade through a ton of annotations, abstractions, base classes, non-fluent APIs, just to copy a file from A to B. Camel seems to me much more essential - maybe because Camel was designed with Integration as primary focus, while Spring Integration just add some Integration functionality to the hyper-complex bloated Spring monster.

Look at all the import you need to just copy a file every 1 second:

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.integration.annotation.InboundChannelAdapter;
import org.springframework.integration.annotation.Poller;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.core.MessageSource;
import org.springframework.integration.file.FileReadingMessageSource;
import org.springframework.integration.file.FileWritingMessageHandler;
import org.springframework.integration.file.filters.SimplePatternFileListFilter;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageHandler;

simply ridiculous.

No comments: