Commit Graph

4151 Commits

Author SHA1 Message Date
Glenn Renfro
efbe2cd005 Update docs to show correct prefix for connection-name-prefix
Currently docs display the correct prefix as spring.cloud.stream.binder where it should be spring.cloud.stream.rabbit.binder
2024-10-21 10:06:50 -04:00
spring-builds
93478a8922 Bumping versions 2024-10-17 14:21:53 +00:00
Artem Bilan
c96a62f163 GH-2939: Rely on custom AmqpHeaders.RETRY_COUNT for server retries
Fixes: https://github.com/spring-cloud/spring-cloud-stream/issues/2939

The RabbitMQ 4.0 does not deal with client side `x-*` headers.
Therefore, an `x-death.count` is not incremented anymore when
message is re-published from client back to the broker.

* Spring AMQP 3.2 has introduced an `AmqpHeaders.RETRY_COUNT` custom header.
Use `messageProperties.incrementRetryCount()` in the `RabbitMessageChannelBinder`
when we re-published message back to the broker for server-side retries
* Fix docs respectively

Resolves #3019
2024-10-17 12:00:11 +02:00
Soby Chacko
bf9ea9e626 Fix Rabbit binder compiliation issues 2024-10-14 14:19:45 -04: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
723f44dd83 Merge pull request #3021 from spring-cloud/dependabot/maven/schema-registry/org.apache.avro-avro-1.11.4
Bump org.apache.avro:avro from 1.11.3 to 1.11.4 in /schema-registry
2024-10-09 08:32:21 +02:00
dependabot[bot]
d68dece939 Bump org.apache.avro:avro from 1.11.3 to 1.11.4 in /schema-registry
Bumps org.apache.avro:avro from 1.11.3 to 1.11.4.

---
updated-dependencies:
- dependency-name: org.apache.avro:avro
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 14:56:35 +00: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
Oleg Zhurakousky
eea905f692 Merge pull request #3015 from sobychacko/gh-2985
GH-2985: Add Kafka Listener Container Customizer interfaces and docum…
2024-10-07 18:43:26 +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
Oleg Zhurakousky
7a5e5d0541 Fix broken cross reference links
Resolves #3018
2024-10-07 18:07:44 +02:00
Soby Chacko
06040728cc Cleanup spring-kafka dependency version. 2024-10-07 10:21:27 -04:00
Ömer Çelik
e445a34f8d Code Cleanup - StringBuilder, Redundant Iteration, Record 2024-10-05 01:32:15 +03:00
Soby Chacko
f8d6caa429 GH-2985: Add Kafka Listener Container Customizer interfaces and documentation
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2985

This commit introduces new customization options for Kafka listener containers
in Spring Cloud Stream, along with comprehensive documentation:

- Add KafkaListenerContainerCustomizer interface for Kafka-specific customization
  with access to extended consumer properties
- Extend ListenerContainerWithDlqAndRetryCustomizer to include access to
  extended consumer properties
- Update KafkaMessageChannelBinder to support the new customizer interfaces
- Implement KafkaListenerContainerCustomizerTests for integration testing
- Add detailed AsciiDoc reference documentation explaining the purpose,
  usage, and hierarchy of these customizer interfaces:
  * ListenerContainerCustomizer (existing)
  * KafkaListenerContainerCustomizer (new)
  * ListenerContainerWithDlqAndRetryCustomizer (extended)
- Update navigation to include the new documentation

These changes enhance the flexibility and configurability of Kafka consumer
endpoints in Spring Cloud Stream applications, allowing users to fine-tune
their listener containers based on specific requirements and scenarios,
with improved access to Kafka-specific properties.
2024-10-04 17:53:13 -04: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