close

Artem Bilan

Artem Bilan

Spring Integration Lead

Philadelphia, PA

Blog Posts by Artem Bilan

Case Study: Aggregator Function and Processor

This article is part of a blog series that explores the newly redesigned Spring Cloud Stream applications based on Java Functions. In this episode, we are investigating the Aggregator function and its relationship with the Splitter function. We will see how we can customize the default behavior. We will also take a look at the importance of configuring a shared message store for the aggregator.

Here are all the previous parts of this blog series.

Read more...

Spring Integration 5.4 Release Candidate 1 Available

Dear Spring community,

it’s my pleasure to announce the first (and the last) release candidate for Spring Integration 5.4 generation.

It can be downloaded from our milestone repository:

compile 'org.springframework.integration:spring-integration-core:5.4.0-RC1'

Since the previous milestone 3 this release brings more into bug fixes and some internal improvements according Project Reactor changes with processors.

The most notable features in this release are:

  • The LogAccessor abstraction from Spring Framework is now used internally for better code readability;

  • The ZeroMqMessageHandler and ZeroMqMessageProducer components are now available for one-way interaction with ZeroMq;

  • The ReactiveRedisStreamMessageProducer now provides an error handling logic via sending an ErrorMessage to the errorChannel;

  • The AbstractMailReceiver now has an option to not fetch a MimeMessage content eagerly and lets the downstream flow to decide what and how to do with such a mail message.

Read more...

Spring Integration 5.4 Milestone 3 Available

Dear Spring community,

please, meet the third (and the last) milestone for Spring Integration 5.4 generation.

It can be downloaded from our milestone repository:

compile 'org.springframework.integration:spring-integration-core:5.4.0-M3'

Since the previous milestone 2 this release brings number of bug fixes and some internal improvement, including alignment with new Sink API from project Reactor in the FluxMessageChannel and IntegrationReactiveUtils.

See What’s New in documentation for more information.

Read more...

Spring Integration 5.4 M2 Available

Dear Spring community,

On behalf of the team and everyone who contributed, it is my pleasure to announce the second milestone for Spring Integration 5.4 generation.

It can be downloaded from our milestone repository:

compile 'org.springframework.integration:spring-integration-core:5.4.0-M2'

This version continues a story since milestone 1 for aggressive dependencies upgrades and deprecation removals, including legacy metrics.

Some key highlights in this milestone alongside with the number of bugfixes and refactorings:

Read more...

Spring Integration 4.3.23, 5.1.12, 5.2.8 & 5.3.2 available; CVE-2020-5413

Dear Spring community,

On behalf of the team and everyone who contributed, it is my pleasure to announce a number of maintenance releases for Spring Integration. Mostly these versions contain bug fixes and dependency upgrades.

CVE-2020-5413

The Spring Integration framework provides Kryo Codec implementations as an alternative for Java (de)serialization. When Kryo is configured with default options, all unregistered classes are resolved on demand. This leads to the "deserialization gadgets" exploit when the incoming data contains malicious code for execution during deserialization.

In order to protect against this type of attack, Kryo can be configured to require a set of trusted classes for (de)serialization. Spring Integration calls kryo.setRegistrationRequired(true); (trust no one) by default and pre-configures out-of-the-box Message<?> implementations as trusted classes. All other types have to be registered with Kryo using any available KryoRegistrar strategy injected into a PojoCodec.

Credit: ChengGao, ZeZhiLin, Alibaba Cloud Intelligence Security Team https://www.aliyun.com/.

All the mentioned Spring Integration versions include the fix for this CVE; everybody who’s using Kryo support in Spring Integration is encouraged to upgrade respectively.

Cheers, 
Artem

Read more...

Spring Integration 5.4 M1 Available

Dear Spring community,

On behalf of the team and everyone who contributed, it is my pleasure to announce the first milestone for Spring Integration 5.4 generation.

It can be downloaded from our milestone repository:

compile 'org.springframework.integration:spring-integration-core:5.4.0-M1'

The Spring Integration 5.4 generation is full based on recently released Spring Framework 5.3 M1 including all the deprecation resolutions, removal some obsolete API and aggressive upgrade the latest versions for dependencies.

Read more...

Spring Integration 5.3 RC1, 5.2.6 & 5.1.10 Available

I’m pleased to announce the first (and the last) release candidate for Spring Integration 5.3.

This release ships several bug fixes, a bunch of new features and improvements and will be picked up by Spring Boot 2.3 RC1.

It can be downloaded from our milestone repository:

compile 'org.springframework.integration:spring-integration-core:5.3.0.RC1'

The most important new features are:

  • The MongoDbChangeStreamMessageProducer - a reactive MessageProducerSupport implementation for the Spring Data ReactiveMongoOperations.changeStream(String, ChangeStreamOptions, Class) API. This component produces a Flux of messages with a body of ChangeStreamEvent as the payload by default and some change stream related headers (see MongoHeaders).

  • The ReactiveMessageSourceProducer - a reactive implementation of the MessageProducerSupport to wrap a provided MessageSource into a Flux for on demand receive() calls.

  • The ReceiveMessageAdvice - a former AbstractMessageSourceAdvice is graduated now to more common advice approach which can be used also for the PollableChannel.receive() proxying.

  • The TcpOutboundGateway now can work in an async mode - you’ll get an actual reply from the returned Future.

  • We also have applied a GitHub default community health. Check this out when you try to raise a new issue https://github.com/spring-projects/spring-integration/issues/new/choose!

See What’s New? in the Reference Manual for more information. Also see a blog post for the previous Milestone 3.

We’re looking forward to your feedback for upcoming GA in May!

In addition to this 5.3 RC1 we also have released maintenance versions - 5.2.6 & 5.1.10 with some bug fixes and upgrades. Based on Spring Integration 5.3 RC1 and Spring for Apache Kafka 2.5 RC1 a spring-integration-kafka-3.3.0.RC1 was also released to pick up improvements and new feature from its "parents".

Read more...

Spring Integration 5.3 Milestone 3 Available

I’m pleased to announce the third milestone for Spring Integration 5.3.

This release ships several bug fixes, a bunch of new features and improvements and will be picked up by Spring Boot 2.3 M3 in the near future.

It can be downloaded from our milestone repository:

compile "org.springframework.integration:spring-integration-core:5.3.0.M3"

The most important new features are:

  • Reactive transactions support. The ReactiveTransactionManager can now be configured for endpoints which produces reactive type for replies or just implement ReactiveMessageHandler.

  • ReactiveRequestHandlerAdvice - a MethodInterceptor for message handlers producing a Mono as a payload for reply. The BiFunction<Message<?>, Mono<?>, Publisher<?>> customized is applied for the returned Mono via Mono.transform(Function) operator to add some aspects into a produced result. Typically it is used for timeout, retry, tag options applied for the remote reactive requests, e.g. Webflux or RSocket.

  • Kotlin DSL. As we promised before, we have merged spring-integration-kotlin-dsl project into core one for general availability and for further possible improvements which are possible only with direct access to core Spring Integration classes. See org.springframework.integration.dsl.IntegrationFlowDsl.kt for more information.

  • Web Services Java DSL. With a lot of community requests the Java DSL components for Web Services modules has made it into project. See org.springframework.integration.ws.dsl.Ws for more information.

See What’s New? in the Reference Manual for more information.

We’re looking forward to your feedback for upcoming RC in April!

Read more...

Spring Integration 5.3 Milestone 2 Available

On behalf of the Spring Integration team, I’m pleased to announce the second milestone for Spring Integration 5.3.

This release ships several bug fixes, a bunch of new features and improvements and will be picked up by Spring Boot 2.3 M2 in the near future.

It can be downloaded from our milestone repository:

compile "org.springframework.integration:spring-integration-core:5.3.0.M2"

The most important new features are:

  • With the IntegrationFlowExtension implementation we now can right our own Java DSL for Spring Integration. It allows to introduce custom or composed EIP-operators. The existing IntegrationComponentSpec implementations can now be extended for additional (missed?) options. So, now any custom and reusable solutions in Java DSL can be implemented in the target project:

public class CustomIntegrationFlowDefinition
        extends IntegrationFlowExtension<CustomIntegrationFlowDefinition> {

    public CustomIntegrationFlowDefinition upperCaseAfterSplit() {
        return split()
                .transform("payload.toUpperCase()");
    }

    public CustomIntegrationFlowDefinition customAggregate(
                    Consumer<CustomAggregatorSpec> aggregator) {
        return register(new CustomAggregatorSpec(), aggregator);
    }

}

public class CustomAggregatorSpec extends AggregatorSpec {

    CustomAggregatorSpec() {
        outputProcessor(group ->
                group.getMessages()
                        .stream()
                        .map(Message::getPayload)
                        .map(String.class::cast)
                        .collect(Collectors.joining(", ")));
    }

}

@Bean
public IntegrationFlow customFlowDefinition() {
    return
            new CustomIntegrationFlowDefinition()
                    .log()
                    .upperCaseAfterSplit()
                    .channel("innerChannel")
                    .customAggregate(customAggregatorSpec ->
                            customAggregatorSpec.expireGroupsUponCompletion(true))
                    .logAndReply();
}
  • HTTP and WebFlux outbound channel adapters now support an UriBuilderFactory.EncodingMode option instead of previous`encodeUri` boolean flag.

  • The AMQP outbound channel adapter has a new property multiSend allowing multiple messages to be sent within the scope of one RabbitTemplate invocation.

  • The AMQP inbound channel adapter now supports a listener container with the consumerBatchEnabled property set to true.

See What’s New? in the Reference Manual for more information.

The next and last M3 milestone is scheduled for March before entering the RC phase in April. Expect an upgrade to the latest milestone releases: Spring Data Neumann, Spring Security 5.3 etc.

We’re looking forward to your feedback!

Read more...

Spring Integration 5.3 Milestone 1 Available

Dear Spring Community,

On behalf of the Spring Integration team I’m excited to announce that with the New Year we have some news to share with you. First of all, it is an honor to have taken over the lead role for the Spring Integration project. Gary Russell is still in the team and he leads Spring AMQP and Spring for Apache Kafka projects. Secondly we have just released the first milestone for Spring Integration of version 5.3.

It can be downloaded from our milestone repository:

compile "org.springframework.integration:spring-integration-core:5.3.0.M1"
Read more...