Commit Graph

45 Commits

Author SHA1 Message Date
Artem Bilan
46dc4d0dd5 GH-500: Workaround for non-serializable header (#503)
Fixes https://github.com/spring-cloud/stream-applications/issues/500

When `listeners` are provided for `DefaultKafkaConsumerFactory`,
the target `KafkaConsumer` instance is proxied.
The `java.lang.reflect.Proxy` is `Serializable`,
but the value it is wrapping is not.
When the `MessageHeaders` is serialized (e.g. into persistent `MessageStore`),
it checks for `Serializable` type only on top-level object of the header.
Therefore, the `Proxy` is passing condition, but eventually we fail
with `NotSerializableException`, since the proxied object is not like that

* Remove `kafka_consumer` from a message before it reaches an aggregator
with its logic to serialize message into the store

This is a workaround until Spring for Apache Kafka is released
with the fix: https://github.com/spring-projects/spring-kafka/pull/2822
2023-09-22 15:02:02 -05:00
GitHub Actions Bot
33f92ab047 Next development version 4.0.0-SNAPSHOT / 2022.0.0-SNAPSHOT 2023-07-21 12:40:45 +00:00
GitHub Actions Bot
99bd5982c9 Release 4.0.0-RC2 / 2022.0.0-RC2 2023-07-21 12:40:08 +00:00
GitHub Actions Bot
5f15796c8a Next development version 4.0.0-SNAPSHOT / 2022.0.0-SNAPSHOT 2023-07-20 14:56:01 +00:00
GitHub Actions Bot
f109933fda Release 4.0.0-RC2 / 2022.0.0-RC2 2023-07-20 14:55:34 +00:00
GitHub Actions Bot
f65cb72e0c Next development version 4.0.0-SNAPSHOT 2023-06-14 04:47:46 +00:00
GitHub Actions Bot
354c82a114 Release 4.0.0-RC1 2023-06-14 04:47:29 +00:00
Corneil du Plessis
ee8738e838 Restore change for Mongo Tests. 2023-06-08 23:56:57 +02:00
Corneil du Plessis
f99016592f [Update] Spring Boot to 3.1.0 2023-06-08 18:47:25 +02:00
abilan
35a37fac5a GH-275: Mention ComponentCustomizer in READMEs
Fixes https://github.com/spring-cloud/stream-applications/issues/275

Many functions make use of `ComponentCustomizer` ot let end-user
to provide any custom configuration for target component used by the function.
First of all for use-case which are not covered by standard configuration
properties and secondly for those options which cannot be represented
as a configuration option.

* Add a sentence to READMEs of those functions which make use of `ComponentCustomizer`
with an expected generic argument type
* Add README into `rabbit-supplier` where it is fully missed at the moment
2023-06-05 22:21:01 -04:00
Artem Bilan
99d2525b3b GH-441: Add JsonBytesToMap function (#461)
Add `JsonBytesToMap` function to allow conversion between byte[] and JSON Map.

Fixes https://github.com/spring-cloud/stream-applications/issues/441

* Introduce a `JsonBytesToMap` as a part of a `payload-converter-function` module
which is auto-discovered by Spring Cloud Function scanning algorithm - the `functions` package.
* Add a `payload-converter-function` as dependency into an `aggregator-function`
* Compose `jsonBytesToMap|aggregatorFunction` for the `aggregator-processor`
* Verify a `JsonBytesToMap` function in action with an `AggregatorProcessorTests`
* Mentioned such a payload conversion in the `aggregator-processor` README
2023-05-30 18:25:27 -05:00
GitHub Actions Bot
bdc100a6c1 Next development version 4.0.0-SNAPSHOT 2023-05-25 11:30:37 +00:00
GitHub Actions Bot
251e1fb998 Release 4.0.0-M2 2023-05-25 11:30:19 +00:00
abilan
75fcc55b25 Disable DefaultAggregatorTests 2023-05-02 17:12:36 -04:00
Corneil du Plessis
b0b3f14992 Fix header filter test. Improve aggregator-filter test configuration. 2023-04-06 12:21:08 +02:00
Corneil du Plessis
d29546c9bd Added logging to aggregator. 2023-02-14 16:59:41 +02:00
Corneil du Plessis
49736da55e Remove assertion for list 2023-02-09 12:29:59 +02:00
Corneil du Plessis
3bf8656c8f Remove assertion for list 2023-02-09 11:39:33 +02:00
Corneil du Plessis
3a0479a3ad Increase timeout for DefaultAggregatorTests 2023-02-07 21:40:28 +02:00
Corneil du Plessis
e9d8fb0c31 Added xmpp to the documentation.
Fixing remaining versions.

Updates #429
2023-02-02 18:51:01 +02:00
Corneil du Plessis
570a8ec777 Upodated aggregator RedisMessageStoreAggregatorTests to use RedisTestContainerSupport. 2023-01-11 16:20:14 +02:00
Corneil du Plessis
189341b8f4 Added TODOs update versions. 2023-01-06 16:49:14 +02:00
Corneil du Plessis
00249f911e [GitHub Actions] Improve dependencies for main. Provide for building impacted dependencies for a PR. 2022-11-07 15:56:07 +02:00
Artem Bilan
735d42048c GH-373: Re-enable aggregator tests (#377)
Fixes https://github.com/spring-cloud/stream-applications/issues/373

The fix in Spring Integration has made it into the latest SNAPSHOT.
See more info in the linked issue

* Update to the latest Testcontainers: it does not require credential for pull command any more
* Remove obsolete `MessageStoreType.GEMFIRE`
* Add `<doclint>syntax</doclint>` to ignore missed javadocs on public methods
2022-10-19 14:09:32 -05:00
Chris Bono
e6a2824f61 [SB3 Update] Agg function use MongoDB testcontainers
- Disable tests
2022-10-16 23:52:42 -05:00
Corneil du Plessis
ec7b11e707 [SB3 Update] Remove Apache Geode (#345)
- Also update SFTP usage
2022-10-07 08:22:57 -05:00
Chris Bono
6f9776f94e Convert to Autoconfiguration.imports 2022-10-02 10:58:48 -05:00
Chris Bono
002204270e Remove ${revision} from pom.xml files 2022-10-02 10:58:48 -05:00
Chris Bono
a8814f876f Initial support for SB3/SF6
- Main branch builds successfully (with tests skipped)

See #326
2022-09-22 17:46:11 -05:00
Artem Bilan
61f1412365 GH-276 Apply ComponentCustomizer in other modules (#284)
* GH-276 Apply ComponentCustomizer in other modules

Fixes https://github.com/spring-cloud/stream-applications/issues/276

Some changes are straightforward as just a `ComponentCustomizer<?>`
injection and its optional usage for the target component customization.
Other changes are more drastic since it is better to use `proxyBeanMethods = false`,
so some direct bean method calls had to be reworked to the bean method argument
injections

* Fix some deprecations from Project Reactor
* Remove `UpdatingMongoDbMessageSource` since `MongoDbMessageSource`
supports now an `update` option in Spring Integration

NOTE: The `ZeroMqSupplierConfiguration` has its own customizer already
like `Consumer<ZMQ.Socket>`, so it can be revised to a more broader solution,
but in the future version.

Some modules just does not make sense to modify for more advance customization
since all their configuration is covered with plain configuration properties.
See `splitter-function` or `wavefront-consumer`

* * Use `ObjectProvider<WebClientCustomizer>` for `HttpRequestFunctionConfiguration`
instead of our own `ComponentCustomizer`.
Although this has to be revised in favor of fully auto-configured `WebClient.Builder`.
Even that `maximumBufferSize` is included into codecs configuration properties.
* The `MongoDbMessageSource` has now an `update` option in Spring Integration
therefore remove redundant already `UpdatingMongoDbMessageSource`
and populate `this.properties.getUpdateExpression()` directly ot the
`MongoDbMessageSource` bean
* Modify supplier configurations to avoid manual starts for endpoints on
reactive `Publisher` subscriptions.
Spring Integration provides now a `toReactivePublisher(true)` operator
to have all the endpoints stopped on start, but started automatically
when subscription happens to the provided `Publisher`
* Update Copyright to the current year for all the affected classes
* Use `@Nullable` instead of `ObjectProvider` in the `AggregatorFunctionConfiguration`
dependency injection for consistency
* Fix `LogConsumerConfiguration` to not have a `log()` in the end - it is not terminal
in Spring Integration anymore.
Use recommended `nullChannel()` terminating operator for use-cases like this.

* * Remove `beanName` from `ComponentCustomizer` contract

Co-authored-by: Chris Bono <cbono@vmware.com>
2022-07-15 19:36:21 -05:00
Chris Bono
1c50531c13 GH-271: Remove duplication from pom.xml files
This proposal fixes many build warnings and is a general cleanup of the pom.xml files.

* Remove duplicate `dependency` entries  from pom.xml files
* Remove duplicate `repository` entries from pom.xml files
* Replace deprecated use of `receive(long)` in `HttpSourceTests`
* Reduce logging for Twitter integration tests

Fixes #271
2022-05-26 13:57:44 -04:00
Artem Bilan
7ed748687e GH-195: Introduce ComponentCustomizer (#273)
Fixes #195 

* Introduce a `ComponentCustomizer` contract to be exposed in
the end-user configuration for particular bean type
* introduce a `@CustomizationAware` annotation to mark a component 
as customizable
* Introduce a `ComponentCustomizationBeanPostProcessor` as an auto-configured
bean to apply `ComponentCustomizer` to a matching `@CustomizationAware` (if any)
* Use `@CustomizationAware` in the `FileSupplierConfiguration`
and demonstrate `ComponentCustomizer` feature in its tests
* Move `config-common` to functions parent to make the mentioned auto-configuration
available for all the functions
* Remove some other duplicated dependencies from the affected poms
2022-05-24 20:55:11 -05:00
Chris Bono
b6895e626c Polish "GH-248: Exclude Geode SSL config"
* Add comments in tests about geode ssl flag verification
2022-04-06 00:06:58 -05:00
Artem Bilan
5d83512da4 GH-248: Exclude Geode SSL config
Fixes https://github.com/spring-cloud/stream-applications/issues/248

The Geode SSL auto-config is done via `SslAutoConfiguration.SslEnvironmentPostProcessor`
which cannot be excluded as an auto-config.

* Set `SslAutoConfiguration.SECURITY_SSL_ENVIRONMENT_POST_PROCESSOR_ENABLED_PROPERTY`
to `false` from the `ExcludeStoresAutoConfigurationEnvironmentPostProcessor`
when the store type is not Geode
2022-04-06 00:01:35 -05:00
Chris Bono
041ffc5e12 Upgrade Geode to support Spring Boot 2.6.3
* Fix Geode integration tests
* Upgrade spring-geode-starter -> 1.6.3
* Upgrade apachegeode/geode -> 1.14.3
* Upgrade spring-data-geode-test -> 0.0.28
2022-01-28 12:13:01 -05:00
Artem Bilan
fc6e93e820 * Use spring.mongodb.embedded.version=3.5.5 - aligned with Spring Boot 2022-01-25 09:37:14 -05:00
Artem Bilan
e5222501c8 Restore embedded MongoDb tests 2022-01-24 11:30:33 -05:00
Soby Chacko
f8d8f1d6df Temporarily disabling a few tests 2022-01-21 17:52:10 -05:00
Artem Bilan
e815e3084c Change doOnSubscribe to doOnRequest
The `aggregatorFunction` has a flaw subscribing and emitting
data from a source `Flux` too early: from a `doOnSubscribe()`
callback which is really called *before* the real subscription is
registered in the target `Publisher`

Change the logic to the `doOnRequest()` which happens already
after subscription is registered in the `Publisher`

**Cherry-pick to `2020.0.x`**
2022-01-20 18:34:21 -05:00
Artem Bilan
bbf04eff2e Limit aggregator tests for 10 seconds to wait 2021-04-07 12:02:02 -04:00
Soby Chacko
760683cc2a Restructuing with maven revision feature
Preserving the maven revision feature from the previous commit,
but perform a bit more restructuring the hierarchy.
2020-10-13 15:17:52 -04:00
Daniel Frey
5e9382c23a Refactor hardcoded versions in functions submodule branches
This is so they can be updated in a minimal amount of places and leverage the maven hierarchy to propagate them where appropriate.
While working with SNAPSHOT releases of Spring Boot, Spring Integration, and Spring Cloud, it required touching every pom.xml file
in order to reflect the use of the SNAPSHOT. After this change, it will only be required to change the property in the top
functions pom.xml and the versions will reflect to all submodules.

Maven introduced the ability use a key property, revision to propagate this information to the <parent> declarations in each pom.

This was enabled in Maven 3.5+
https://maven.apache.org/maven-ci-friendly.html
2020-10-13 15:15:59 -04:00
Soby Chacko
f257f48f78 Next version updates
Functions: 1.0.0-SNAPSHOT
  Core Apps: 3.0.0-SNAPSHOT
  Apps: 3.0.0-SNAPSHOT
  Aggregate Next:2020.0.0-SNAPSHOT
2020-09-29 18:28:20 -04:00
Soby Chacko
73a3e55299 Functions: Release - 1.0.0-M3 2020-09-29 14:59:33 -04:00
Artem Bilan
b27897227d Add Aggregator function & processor
* Have all the required dependencies in class path which give us a `MessageGroupStore` implementation
* Disable all their auto-configurations in the `ExcludeStoresAutoConfigurationEnvironmentPostProcessor`
* Enable only those which are configured by the `aggregator.messageStoreType` property
* Implement a fully reactive function around an aggregator making an interaction via a pair of `FluxMessageChannel`
* Fix checkstyle issues
* Change the app generator maven plugin to new coordinates
2020-08-20 15:54:51 -04:00