Commit Graph

328 Commits

Author SHA1 Message Date
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
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
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
6f9809eba1 Fix depreactions 2024-09-27 16:41:56 +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
56047ddb19 GH-2997 Fix support for producer's error-handler-definition
Resolves #2997
2024-09-24 17:20:46 +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
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
buildmaster
71e0c92e7c Bumping versions 2024-08-06 18:45:33 +00: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
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
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
Soby Chacko
244de0fcea Rabbit biner AOT/native runtime hints
* Add missing native runtime hints for the Rabbit binder properties classes

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2938
2024-05-29 16:59:46 -04:00
Soby Chacko
0e2954c01e GH-2941: Kafka Streams binder composition issues
* When composed functions are used on component functions in the Kafka Streams binder,
  there is an issue in which the first function in the composition is invoked twice.
  Fixing this issue by ensuring that the function execution path is only invoked once.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2941
2024-05-29 11:57:59 -04:00
Soby Chacko
13f94d266f ReactorKafkaBinderTests race condition issue
* There seems to be a race condition in ReactorKafkaBinderTests that causes
  tests to fail on CI occasionaly. Trying to address this by single dedicated
  topic per test.
2024-05-17 17:38:53 -04:00
Soby Chacko
fd9fa80055 Test cleanup
* Use `EnableAutoConfiguration` instead of `SpringBootApplication` in tests
2024-05-16 15:28:54 -04:00
Soby Chacko
49b7a8028a Kafka binder test cleanup
* Use `EnableAutoConfiguration` instead of `SpringBootApplication` in tests
2024-05-16 14:25:56 -04:00
Soby Chacko
bd2bf09d1e GH-2951: Batch consumer and DLQ issues
Batch consumer with `ListenerContainerWithDlqAndRetryCustomizer` should disable binder-based DLQ.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2951

* Addressing PR review comments

* Addressing review
2024-05-16 11:56:55 -04:00
Soby Chacko
a3c4364740 GH-2949: KafkaBinderHealthIndicator consumer group.id
* Add a new property in `KafkaBinderConfigurationProperties` to allow
  the users to specify a `group.id` for the metadata consumer used by the
  health indicator.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2949
2024-05-13 20:43:30 -04:00
Soby Chacko
a89331c095 GH-2948: Adding configuration for ReactorKafkaBinderHealthIndicator
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2948
2024-05-13 13:49:25 -04:00
Soby Chacko
c2754de2ab GH-2943: EmbeddedKafka usage improvements in Kafka binder
* Currently, EmbeddedKafka is initialized as part of the class initialization in a few tests
  in the Kafka binder. This is preventing individual JUnit tests from being executed from an IDE (IntelliJ, for example).
  If we move this initialization to the JUnit  method, then that seems to be working.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2943
2024-05-01 13:46:23 -04:00
Soby Chacko
d534e840dc GH-2942: EmbeddedKafka usage improvements in Kafka Streams binder
* Currently, EmbeddedKafka is initialized as part of the class initialization.
  This is preventing individual JUnit tests from being executed from an IDE (IntelliJ, for example).
  If we move this initialization to the JUnit `BeforeAll` method, then that seems to be working.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2942
2024-05-01 11:52:47 -04:00
Soby Chacko
1d241583c3 GH-2941: Kafka Streams Component beans composition
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2941

* Introduce function composition for Kafka Streams Component beans
2024-04-30 21:00:04 -04:00
Soby Chacko
7845be50ef GH-2932: Sanitize sensitive data on bindings endpoint
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2932

Spring Boot provides `SanitizingFunction` to allow the applicaitons to clear out
sensitive data when using certain actuator endpoints. This feature can be
extended to custom endpoints as well. Enable the bindings actuator endpoint
to sanitze sensitive data based on user-provided logic in `SantizingFuction`
beans in the application.
2024-04-17 17:30:28 -04:00
Chris Bono
3d679c491c Fix custom test PulsarProducerFactory
Spring Pulsar 1.1.x introduced a new method `getPulsarClient`
on `PulsarProducerFactory` and the PulsarBinderIntegrationTests
has a custom factory that must be updated in order to run
on both Pulsar 1.0.x and 1.1.x (i.e. Spring Boot 3.2.x and 3.3.x).
2024-04-15 09:44:38 -04:00
Soby Chacko
3298d0d3c7 SBFM issues with afterSingletonsInstantiated
Related to GH-2935. Ensure that afterSingletonsInstantiated is called
even when autoStartup is not enabled.
2024-04-12 22:09:43 -04:00