Commit Graph

286 Commits

Author SHA1 Message Date
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
buildmaster
2cbcd93232 Going back to snapshots 2024-07-10 16:21:05 +00:00
buildmaster
f459e2bfcd Update SNAPSHOT to 4.1.3 2024-07-10 16:17:09 +00:00
Soby Chacko
df3c467834 Checkstyle fixes 2024-06-18 19:24:09 -04:00
Soby Chacko
604649d083 GH-2961: Concurrent writes and partition header
- When concurrent threads publish to a binding, PartitionAwareFunctionWrapper
  resets to null between invocations. Addressing this issue by guarding this reset
  from occurring if the partiton header on the producer is found.

Fixes https://github.com/spring-cloud/spring-cloud-stream/issues/2961
2024-06-18 19:20:07 -04:00
Soby Chacko
4b2810f49a Fixing checkstyle issues 2024-06-18 19:08:56 -04:00
Théophane Charbonnier
2a5938e0fe GH-2961 : failing test for Header scst_partition randomly ommitted 2024-06-18 19:03:40 -04:00
Chanhyeong Cho
ae32191310 Minor cleanup
* Remove reference to @EnableBinding in DefaultBinding
* Docs cleanup
2024-06-17 15:20:50 -04:00
Oleg Zhurakousky
9e6caef371 GH-2955 Remove dynamicDestination property from BindingServiceProperties
Resolves #2950
2024-06-07 08:28:41 +02:00
Oleg Zhurakousky
d6550ed324 GH-2956 Fix assertion for multiple binders
Resolves #2956
2024-06-04 08:36:53 +02:00
buildmaster
7c206241cc Bumping versions to 4.1.3-SNAPSHOT after release 2024-05-30 10:53:13 +00:00
buildmaster
084242ac9e Going back to snapshots 2024-05-30 10:53:12 +00:00
buildmaster
79d093e984 Update SNAPSHOT to 4.1.2 2024-05-30 10:49:10 +00:00
Oleg Zhurakousky
625f25130d GH-2930 Add configuration metadata
Resolves #2930
2024-05-27 09:10:53 +02:00
Oleg Zhurakousky
7f0021b394 GH-2728 Change the order of the refresh for multicontext 2024-05-27 09:05:50 +02:00