Commit Graph

4135 Commits

Author SHA1 Message Date
Ö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
Oleg Zhurakousky
9aabfbe6ea Merge pull request #3011 from kurthong/BindingServiceProperties.bindings-property-should-be-thread-safe
Ensuring Thread-Safety for BindingServiceProperties.bindings
2024-09-27 11:00:21 +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
Soby Chacko
417551365b Add 4.1.x branch to the CI PR builds 2024-09-24 15:54:51 -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
5d881b2adb GH-2994, GH-2986 Add documentation explaining batch type conversion 2024-09-23 16:47:36 +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
29a3558329 Make MessageConverterHelper bean names distinct in binders. 2024-09-19 16:16:41 -04: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
058fc660ae Enhancements in Kafka binder FunctionBatchingConversionTests 2024-09-18 13:30:10 -04:00
Soby Chacko
fac9eb1ebd Customizing batch message conversion behavior for Kafka binder
Continuation of the previous commit: 14c10462f8
2024-09-17 14:39:30 -04:00
Oleg Zhurakousky
14c10462f8 GH-2994, GH-2986 Add initial support for customizing Message Converter behavior
primarily during batch processing.
2024-09-16 16:10:38 +02: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
Oleg Zhurakousky
f456405b02 Merge pull request #2998 from hightea/fix-duplicate-errors-logs
Avoid duplicate error logging when multiple destinations per binding
2024-09-05 02:42:57 -07:00
Théophane Charbonnier
a64a6e53e1 Avoid duplicate error logging when multiple destinations per binding 2024-09-05 10:04:13 +02:00
Chris Bono
64dd18cc8e Use PulsarTopicBuilder in Pulsar binder (#2999)
Spring for Apache Pulsar introduced support for default tenant and namespace
for Pulsar topics in 6d23378fbb.
This ensures that all topic names are fully-qualified (using the default
tenant and namespace when not fully-qualified).
2024-09-03 19:20:18 -04:00
Kurt Hong
fe1392efb0 KafkaBinderMetrics' metrics should be unregistered before it's thread
* KafkaBinderMetrics' metrics should be unregistered before it's threadpool is shutdown.
* update authors and copyright years
2024-08-23 13:36:41 -04:00
Ömer Çelik
8e5f67a1a6 Code cleanup
Resolves #2990
2024-08-20 15:03:39 +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
Soby Chacko
b898e396ed Re-enable SchemaRegistryServerAvroTests
* Update the expected error messages
2024-08-07 17:49:47 -04:00
Oleg Zhurakousky
dffbe6d610 Merge pull request #2984 from andq/main
Fix typo in docs
2024-08-07 17:29:54 +02:00
buildmaster
71e0c92e7c Bumping versions 2024-08-06 18:45:33 +00:00
spencergibb
9bfc242941 Disables tests 2024-08-06 14:18:39 -04:00
spencergibb
721b904ae2 Disables tests 2024-08-06 13:50:18 -04:00
spencergibb
8eda26210a Disables tests 2024-08-05 16:06:14 -04:00
spencergibb
42c42104ea Fixed compile errors with replacements for deprecations 2024-08-05 15:53:43 -04:00
andq
1b4e3fbad8 Fix typo in docs 2024-08-03 19:41:18 +02:00
buildmaster
3dd4a0747b Bumping versions 2024-08-02 10:15: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