Commit Graph

300 Commits

Author SHA1 Message Date
spring-builds
f1e6c87814 Bumping versions to 4.2.1-SNAPSHOT after release 2024-12-03 00:21:56 +00:00
spring-builds
f03ea2582a Going back to snapshots 2024-12-03 00:21:54 +00:00
spring-builds
b26353cfcc Update SNAPSHOT to 4.2.0 2024-12-03 00:18:38 +00:00
Ömer Çelik
dccf8ae16a Message Channel should be closed in specified cases : application shutdown, unbinding or exceeding cache size.
checkstyle fixes

Resolves #2869
Resolves #3026
2024-11-18 14:07:48 +01:00
Fernando Blanch
a1c7773a82 Change order of the registry of sources classes after configuring Environment with all propertySources, so that sources classes can resolve conditions configurations. Fixes GH-3031
Resolves #3032
2024-11-18 11:36:22 +01:00
spring-builds
1b083c943e Going back to snapshots 2024-11-08 01:39:01 +00:00
spring-builds
34798150d8 Update SNAPSHOT to 4.2.0-RC1 2024-11-08 01:36:20 +00:00
Soby Chacko
e14bc1cb51 Revert "Adding Spring Cloud Stream Version To Message Headers For Easier Debugging Of Issues."
This reverts commit a8fb34db0e.
2024-11-05 16:50:08 -05:00
Soby Chacko
13874dc2aa Addressing checkstyle issues 2024-11-05 16:28:12 -05:00
Oleg Zhurakousky
505a33be9e Add additional utility methods 2024-11-05 15:53:52 +01:00
Oleg Zhurakousky
baaf8d555a GH-2969 Initial commit to add StandardBatchUtils 2024-11-05 15:53:52 +01:00
Ömer Çelik
a8fb34db0e Adding Spring Cloud Stream Version To Message Headers For Easier Debugging Of Issues.
Fix checkstyles
Resolves #3027
2024-11-05 12:50:19 +01:00
Artem Bilan
17ac6352e4 Fix FunctionConfiguration.sanitize() for generics
The `FunctionConfiguration.sanitize()` use a `rawtypes` trying to hide
generics routines.

Spring Integration 6.4 has introduced a `BaseMessageBuilder` which does not work
with `rawtypes`.

* Fix `FunctionConfiguration.sanitize()` to expose a `<P>` generic argument
to satisfy a new `MessageBuilder` byte code, plus to meet all the expectations
of this method consumers
* In addition perform some code clean to optimize a usage of `MessageBuilder`:
 - `setHeader()` does set the value overriding existing one
 - `setHeader()` removes the entry if provided value is `null`
 - This way we just can go ahead with `MessageBuilder` method chain avoiding extra conditions
2024-11-04 16:25:24 -05:00
Oleg Zhurakousky
12468dcd0a Fix checkstyles 2024-10-21 17:57:07 +02:00
Soby Chacko
d9326ada75 Adding kotlin-stdlib-jdk8 depedency in spring-cloud-stream-integration-tests 2024-10-14 12:33:23 -04:00
Oleg Zhurakousky
3c70c04806 GH-3020 Make Kotlin dependency optional
Resolves #3020
2024-10-08 14:53:43 +02:00
buildmaster
a81fb04286 Going back to snapshots 2024-10-08 01:06:11 +00:00
buildmaster
67d4d34a58 Update SNAPSHOT to 4.2.0-M2 2024-10-08 01:03:40 +00:00
Oleg Zhurakousky
559d49381f Merge pull request #3017 from omercelikceng/codecleanupp
Code Cleanup - StringBuilder, Redundant Iteration,  Record
2024-10-07 18:44:05 +02:00
Ömer Çelik
cbfd3aa995 Change "synchronized" to reentrant lock for virtual-threads
Fix checkstyles before merge

Code cleanup

Double-Checked Locking Optimization was used to avoid unnecessary locking overhead.
2024-10-07 18:40:51 +02:00
Ömer Çelik
e445a34f8d Code Cleanup - StringBuilder, Redundant Iteration, Record 2024-10-05 01:32:15 +03:00
Oleg Zhurakousky
6f1b5a4d93 Fix checkstyles before merge
Resolves #3012
2024-10-02 12:25:22 +02:00
김동근
94142aa80f change synchronized to reentrant lock in streambridge 2024-10-02 12:15:47 +02:00
Oleg Zhurakousky
56d86c9807 GH-2974 Fix validation when only 'default' properties are used
Resolves #2974
2024-10-02 12:14:47 +02:00
Oleg Zhurakousky
6f9809eba1 Fix depreactions 2024-09-27 16:41:56 +02:00
kurt
fd20513f86 BindingServiceProperties.bindings property should be thread-safe.
First, thanks for the excellent StreamBridge feature! I've found it very useful.
However, I occasionally encounter the following exception during race conditions.
```
java.lang.NullPointerException: null
    at java.base/java.util.TreeMap.rotateRight(TreeMap.java:2240)
    at java.base/java.util.TreeMap.fixAfterInsertion(TreeMap.java:2272)
    at java.base/java.util.TreeMap.put(TreeMap.java:580)
    at org.springframework.cloud.stream.config.BindingServiceProperties.bindToDefault(BindingServiceProperties.java:397)
    at org.springframework.cloud.stream.config.BindingServiceProperties.bindIfNecessary(BindingServiceProperties.java:381)
    at org.springframework.cloud.stream.config.BindingServiceProperties.getBindingProperties(BindingServiceProperties.java:301)
    at org.springframework.cloud.stream.function.StreamBridge.send(StreamBridge.java:149)
```
BindingServiceProperties.bindings property should be thread-safe.
2024-09-26 23:51:33 +09:00
Oleg Zhurakousky
2f4ae47276 GH-3009 Add post processing support for Supplier
Resolves #3009
2024-09-26 14:10:04 +02:00
Andy Wilkinson
b7f2f1bb2d Support Spring Boot's KafkaConnectionDetails for Kafka connections
- Integrate KafkaConnectionDetails, a Spring Boot component, in binder
- Update KafkaBinderConfigurationProperties to use KafkaConnectionDetails
- Modify KafkaTopicProvisioner to leverage KafkaConnectionDetails
- Adjust Kafka binder configurations to pass KafkaConnectionDetails
- Update tests to accommodate KafkaConnectionDetails changes
- Add KafkaConnectionDetails to shared.beans for auto-configuration

This change improves flexibility in configuring Kafka connections,
allowing for better support of externalized configuration management
and aligning with Spring Boot's connection abstraction model.
2024-09-24 16:53:08 -04:00
Oleg Zhurakousky
eecec4198a Merge pull request #3005 from ferblaca/GH-3004
Change the use of synchronized in the getBinder method of DefaultBinderFactory class for virtual-threads compliant
2024-09-24 18:25:57 +02:00
Oleg Zhurakousky
56047ddb19 GH-2997 Fix support for producer's error-handler-definition
Resolves #2997
2024-09-24 17:20:46 +02:00
Fernando Blanch
2f82f3cd02 Remove the use of synchronized in the getBinder method of DefaultBinderFactory class for virtual-threads
The getBinder method in DefaultBinderFactory was made thread-safe using ReentrantLock. This commit ensures that the method is friendly for virtual threads to avoid blocking and pinning. The lock is acquired at the beginning of the method and released in a finally block to ensure it is always released, even if an exception occurs. Fixes gh-3004
2024-09-24 16:09:27 +02:00
Oleg Zhurakousky
03dc940ea9 Merge pull request #3000 from MAX-66/fix-output-bindings-code
Simplify outputBindings assignment logic in FunctionConfiguration
2024-09-23 15:01:26 +02:00
Soby Chacko
42d91e0ff3 GH-2650: Observability enhancements in reactive Kafka binder
Fixes https://github.com/spring-cloud/spring-cloud-stream/issues/2650

* Enable native observability support for output binding in the reactive Kafka binder
* Adding test to verify this support with downstream consumers
* Adding ref docs
* Addressing PR review
2024-09-19 12:48:19 -04:00
Soby Chacko
4df2e760b9 Fixing failing tests
Mostly related to this commit in spring-cloud-funtion:
85a4fffcd4
2024-09-10 15:54:25 -04:00
lxq
0065a65d08 Simplify outputBindings logic in FunctionConfiguration
- Removed redundant checks and method calls for outputBindings.
- Improved readability and reduced code complexity.
2024-09-05 22:32:51 +08:00
Théophane Charbonnier
a64a6e53e1 Avoid duplicate error logging when multiple destinations per binding 2024-09-05 10:04:13 +02:00
Ömer Çelik
7fefaa38c0 Code cleanup 2024-08-20 12:53:03 +02:00
buildmaster
1de0e1c690 Going back to snapshots 2024-08-19 18:09:13 +00:00
buildmaster
b1507bdc01 Update SNAPSHOT to 4.2.0-M1 2024-08-19 18:06:14 +00:00
buildmaster
26dddfe1c1 Going back to snapshots 2024-08-19 17:29:31 +00:00
buildmaster
15f5791281 Update SNAPSHOT to 4.2.0-M1 2024-08-19 17:26:43 +00:00
Artem Bilan
268423327b GH-2989 - Make SpEL converter stringify primitive values
Resolves #2989
2024-08-19 12:11:39 +02:00
Oleg Zhurakousky
6aa9062247 Merge pull request #2983 from omercelikceng/messageHeadersTest
Missing Headers Problem
2024-08-08 11:00:30 +02:00
buildmaster
71e0c92e7c Bumping versions 2024-08-06 18:45:33 +00:00
Ömer Çelik
98501d7535 Missing Headers Problem 2024-08-02 01:06:04 +03:00
Ömer Çelik
1a0d6d3246 Missing Headers Problem 2024-08-02 00:56:02 +03:00
Artem Bilan
3b5bb2e0d9 Remove redundant delaySubscription from FunctionConfiguration
Related to: https://github.com/spring-projects/spring-integration/issues/9362

After the fix in Spring Integration: bdcb856a90
we ended up in a deadlock situation with a `beginPublishingTrigger` in the `FunctionConfiguration`
used for the `delaySubscription()` on an original `Publisher`.
The `FluxMessageChannel` uses its own `delaySubscription()` until the channel has its subscribers.
Apparently the logic before was with errors, so the `FluxMessageChannel` was marked as active
even if its subscriber is not ready yet, leading to famous `Dispatcher does not have subscribers` error.
So, looks like this `beginPublishingTrigger` was introduced back in days in Spring Cloud Stream
to mitigate that situation until we really emit a `BindingCreatedEvent`.

The deadlock (and the flaw, respectively) is with the `setupBindingTrigger()` method implementation
where `FluxMessageChannel` now "really" delays a subscription to the provided `Publisher`,
therefore not triggering that `Mono.create()` fulfilment immediately.
The `BindingCreatedEvent` arrives earlier, than we have a subscriber on the channel,
but `triggerRef.get()` is `null`, so we don't `success()` it and in the end don't subscribe
to an original `Publisher` since `delaySubscription()` on it is never completed.

Since `FunctionConfiguration` fully relies on `IntegrationFlow.from(Publisher)`,
which ends up with the mentioned  `FluxMessageChannel.subscribeTo()` and its own `delaySubscription()`
(which, in turn, apparently fixed now), we don't need our own `delaySubscription()` any more.
Therefore the fix in this PR is to propose to remove `beginPublishingTrigger` logic altogether.
2024-07-26 15:57:12 -04:00
Oleg Zhurakousky
f356599503 GH-1163-function
Added test for the fix provided in s-c-function
2024-07-17 17:20:32 +02:00
Oleg Zhurakousky
07e7d81e2d GH-2971 Properly handle Kafka tombstone payload conversion
See the corresponding commit in s-c-function
Resolves #2971
2024-07-17 16:19:12 +02:00
buildmaster
b5eccf6232 Bumping versions to 4.1.4-SNAPSHOT after release 2024-07-10 16:21:06 +00:00