Commit Graph

4222 Commits

Author SHA1 Message Date
Soby Chacko
d6cc07df97 GH-3090: Ensure client factory customizers are applied before transaction manager creation
Fixes: #3090

Issue: https://github.com/spring-cloud/spring-cloud-stream/issues/3090

Fixes issue where KafkaBinderConfiguration would add customizers after the
transaction manager was already created.

The KafkaMessageChannelBinder was initializing the transaction manager in the
constructor before client factory customizers were added, which meant the customizers
were never applied to the producer factory used by the transaction manager.

- Moves transaction manager initialization from the constructor to the onInit() method
- Leverages the existing InitializingBean lifecycle to ensure customizers are applied
  before the transaction manager is created
- Adds comprehensive test coverage to verify the fix in the binder and via auto-configuration

Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>

Resolves #3091
2025-03-13 16:58:26 +01:00
Soby Chacko
525a5c1220 Update actions/upload-artifact@v4 in CI PR build
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-13 09:57:17 -04:00
Soby Chacko
dcd34d1593 Setup Maven cache gh action used in PR CI build to v4
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-13 09:51:24 -04:00
Soby Chacko
b342c2157f Document exception retry behavior for Kafka transactions
Signed-off-by: Soby Chacko <soby.chacko@broadcom.com>
2025-03-10 17:11:16 -04:00
DidierLoiseau
48659f9e92 Fixes: #3066
Issue link: https://github.com/spring-cloud/spring-cloud-stream/issues/3066

Signed-off-by: DidierLoiseau <didierloiseau+github@gmail.com>
2025-03-10 16:51:30 -04:00
akenra
e0fdfdecc8 fix(kafka-topic-provisioner): Prevent resource leak on binding producer to KafkaMessageChannelBinder
- Producer that fetches partition info now initializes within a try-with-resources block
- If exceptions occur on calling producer.partitionsFor(topicName), it's now properly closed and resources are released

Signed-off-by: akenra <37288280+akenra@users.noreply.github.com>
2025-03-07 22:42:56 +05:00
spring-builds
a5c53f735f Going back to snapshots 2025-02-27 15:46:58 +00:00
spring-builds
1a4eadd8fe Update SNAPSHOT to 4.3.0-M2 2025-02-27 15:44:27 +00:00
Oleg Zhurakousky
afc8fa29da GH-3076 Change 'bindings' to ConcurrentHashMap in 'BindingServiceProperties'
Using 'ConcurrentSkipListMap' was causing significant performance issues

Resolves #3076
2025-02-26 08:39:00 +01:00
spring-builds
d847f1cfaa Bumping versions 2025-02-22 15:02:27 +00:00
spencergibb
9889362f44 Formatting 2025-02-21 11:51:18 -05:00
Oleg Zhurakousky
c6c5e09c5d GH-3085 add test configuration file 2025-02-21 15:15:09 +01:00
Oleg Zhurakousky
3e624057a7 GH-3085 Add Number and Boolean Spel converter
Refactor SpelConverter into an abstract class

Resolves #3085
2025-02-21 15:05:51 +01:00
spencergibb
648269ca93 Revert "Temporarily upgrade to spring-framework-bom:6.2.4-SNAPSHOT"
This reverts commit 0716ec3a4d.
2025-02-19 13:00:04 -05:00
spencergibb
ea074ac414 Sets proxyBeanMethods = false on test config 2025-02-18 11:49:07 -05:00
spencergibb
0716ec3a4d Temporarily upgrade to spring-framework-bom:6.2.4-SNAPSHOT 2025-02-18 11:38:42 -05:00
Oleg Zhurakousky
fb3c889c9c Merge pull request #3079 from StevenPG/bugfix/handle-null-result-on-function-invocation-streambridge
Add Null Handling for FunctionToInvoke in StreamBridge along with Test
2025-02-11 16:50:00 +01:00
Steven Gantz
25427bc718 Add additional test and error handling
Handle when functionToInvoke returns null

add link to issue

Signed-off-by: Steven Gantz <steven.p.gantz@gmail.com>
2025-02-10 20:59:43 -05:00
Oleg Zhurakousky
7178dbfdac Merge pull request #3074 from tautologicc/fix-docs-typo
Fix typos in documentation
2025-02-03 08:21:17 +01:00
F. Emerson
fe6a0ab8b7 Fix typos in documentation
Signed-off-by: F. Emerson <t@utologi.cc>
2025-01-30 18:21:41 -03:00
Oleg Zhurakousky
b5b8b3089d GH-3071 Add documentation for accessing producer/consumer properties
Resolves #3071
2025-01-30 15:35:33 +01:00
spring-builds
dc3669bfcf Going back to snapshots 2025-01-30 03:00:53 +00:00
spring-builds
4edccc3b56 Update SNAPSHOT to 4.3.0-M1 2025-01-30 02:58:18 +00:00
Oleg Zhurakousky
adddeffbf3 GH-3071 Add support for accessing producer/consumer properties 2025-01-28 09:36:58 +01:00
spring-builds
fcd7cba51d Bumping versions 2025-01-18 15:09:52 +00:00
Soby Chacko
8954aaf336 Bumping next version to 4.3.0-SNAPSHOT 2025-01-17 11:06:07 -05:00
Oleg Zhurakousky
0c29e74bb4 Add DCO.yaml 2025-01-17 14:34:51 +01:00
Oleg Zhurakousky
70b8037966 Merge pull request #3064 from artembilan/GH-3062
GH-3062: Fix `KafkaBinderMetrics` for resource leaks
2025-01-08 11:25:10 +01:00
Artem Bilan
f259c55704 * Implement SmartLifecycle contract on the DefaultBinderFactory.
When CRaC checkpoint is requested, the binder contexts must be stopped as well,
which includes all their managed beans, respectively.
2025-01-07 14:22:23 -05:00
Oleg Zhurakousky
534277ff3d GH-3065 Fix lazy initialization for Kafka streams configuration classes
Resolves #3065
2025-01-06 15:07:27 +01:00
Artem Bilan
90afffb273 GH-3062: Fix KafkaBinderMetrics for resource leaks
Fixes: https://github.com/spring-cloud/spring-cloud-stream/issues/3062

The `KafkaBinderMetrics` creates `KafkaConsumer` instances and schedule the fix rate
task for them, but never closes them even when the `scheduler` is shut downed

* Implement a `Lifecycle` contract in the `KafkaBinderMetrics` and call `close()`
from the `stop()` to satisfy CRaC resource management expectations.
* Also close all the `KafkaConsumer` instances from the `metadataConsumers`

**Cherry-pick to `4.1.x`**
2025-01-03 14:43:28 -05:00
Oleg Zhurakousky
af6b4ff9eb Merge pull request #3063 from destan/patch-1
Clarify that having a custom error handler disables auto send to DLQ
2025-01-03 17:51:20 +01:00
Destan Sarpkaya
9b1fbfb59d Clarify that having a custom error handler disables auto send to DLQ 2025-01-03 16:40:39 +03:00
Oleg Zhurakousky
3f8b7003e7 GH-3054 Clear channel cache in StreamBridge during the refresh
Resolves #3054
2024-12-19 12:06:00 +01:00
spencergibb
637636dfa8 Adds @ConditionalOnMissingBean to test binder ObservationRegistry 2024-12-12 10:43:44 -05:00
Oleg Zhurakousky
ad2a654160 GH-3055 Polish 2024-12-12 14:27:58 +01:00
Oleg Zhurakousky
e8bed37161 GH-3055 Add BinderHeaderMapper to reactive Kafka binder
Resolves #3055
2024-12-12 13:49:36 +01:00
Oleg Zhurakousky
aa2b309e66 GH-3030 Modify InputBindingLifecycle phase
Resolves #3030
2024-12-11 13:17:38 +01:00
Oleg Zhurakousky
2f9be858d7 GH-3055 Add additional types for toString() serialization
Add additional types for toString() serialization to Kafka's  to ensure propper serialization/deserialization of message header values.

Resolves #3055
2024-12-11 13:08:41 +01:00
Oleg Zhurakousky
4fb9a16c99 Fix tests after Observation feature was added to StreamBridge 2024-12-09 15:48:59 +01:00
Oleg Zhurakousky
1349adaba3 GH-3053 Fix regression with 'default' properties validation
Resolves #3053
2024-12-09 13:52:49 +01:00
Oleg Zhurakousky
c67fca58c4 GH-3052 Add to additional-spring-configuration-metadata.json
Resolves #3052
2024-12-04 16:16:44 +01:00
Agustino Lim
a88c34fc9f GH-3033: Register ObservationRegistry for Dynamic MessageChannels
Fixes: gh-3033

* ensure `ObservationRegistry` is registered on dynamically created `MessageChannel` instances in `StreamBridge`
2024-12-04 13:13:20 +01:00
Oleg Zhurakousky
f392488dae Merge pull request #3044 from omercelikceng/fix-typo-docs
Fix typo in docs for rabbit and spring cloud stream sections
2024-12-04 13:12:26 +01:00
Oleg Zhurakousky
9bd2c87bb1 Merge pull request #3043 from omercelikceng/fix-typo
Fix typo in docs
2024-12-04 13:12:02 +01:00
spring-builds
2aa8d495cd Bumping dependency versions after release 2024-12-03 00:23:06 +00:00
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
spring-builds
8cdde2e3fd Bumping versions 2024-11-23 14:13:43 +00:00