Vaclav Kosar's face photo

Vaclav Kosar

Vaclav Kosar is a senior software developer. This blog is focused on interesting technology, tips and news.

RxJS And Spring Integration Concept Similarities

05 Nov 2017

I like to compare similar concepts as it helps me to understand them better. Concepts are defined by other concepts and thus knowing more relations between them can improve ability to work with them.

RxJS and Spring Integration are similar as former deals with event streams and latter with message streams. Below is a table comparing concepts in both frameworks.

RxJS Spring Integration Note
Observable IntegrationFlowDefinition Part of Spring Integration DSL. Alternatively could be compared to MessageHandlerChain.
Subject SubscribableChannel (PublishSubscribeChannel) Both frameworks allow publishing to multiple subscribers
Operator GenericTransformer Operator is more general than transformer e.g. Router cannot be expressed as transformer.
filter filter Both filter elements.
map transform Both map elements.
- MessageChannel MessageChannels are named connections with additional abilities like queuing.
~ Stream DirectChannel Single threaded - push strategy.
- Router RxJS can do it with Subject and subscribed filtered streams.
ReplaySubject - Similar concept to durable topic
flatMap splitter Both split incoming elements into multiple.
delay delay Both delay elements.
take - Not found probably because Spring Integration is intended mainly for channels living throughout the app.
buffer ReleaseStrategy Aggregator  
Subject#onNext Gateway Not directly equivalent but both can be used to publish on a method call.

We can see that for most concepts we are able to find almost direct equivalent in the other framework. For those we cannot, an alternative can be easily introduced.

Subscribe: Twitter , Facebook , RSS ,
Share on: Twitter , Facebook , Google+ , LinkedIn , Reddit .

Report any trackers to [email protected].