Commit Graph

4038 Commits

Author SHA1 Message Date
Michał Rowicki
f836e1cf54 GH-2923: StreamBridge and Kafka send with virtual threads
* Sending Kafka events via StreamBridge#send using virtual threads causes pinning. 
     Use a ReentrantLock to avoid pinning.
2024-03-19 16:40:10 -04:00
Soby Chacko
e80f53fbe8 Adding rabbitmq docker-compose 2024-03-19 15:28:02 -04:00
Patrik Süli
e03b993c3b GH-2919: Eager loading FunctionConfiguation
* Always eager loading `FunctionConfiguration`

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2919
2024-03-18 17:39:04 -04:00
Chris Bono
fcdaf2fdd8 Fix Pulsar binder for Java 21 (#2918)
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2915

Running the Pulsar binder with Java 21 surfaced a bug where the layered
binder/binding config props are not properly applied to the targeted
consumer/producer builders.

The bug existed before Java 21 and is unrelated.

The binder/binding config props are converted to a Pulsar
ProducerConfigurationData object via Jackson. This conversion process iterates
over a map of config props. The iteration order of the map changed between Java
17 and 21. This results in object setters getting called in different orders, 
which in turn causes cross-field validation errors.

See #2915 for more details
2024-03-14 15:47:21 -04:00
Soby Chacko
a2458f3029 Clarify batch-consuming docs for Kafka binder
Based on this issue: https://github.com/spring-cloud/spring-cloud-stream/issues/2917
2024-03-14 10:54:52 -04:00
Ryan Baxter
d2e66b76a1 Update antora-playbook.yml to 0.4.11 2024-03-12 10:35:33 -04:00
Soby Chacko
fac0c143ad GH-2560: Clarify docs on error handling/DLQ
* Clarify the docs on retry behavior in Kafka binder when max-attempts set to 1 and no DLQ

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2560
2024-03-08 18:20:43 -05:00
Soby Chacko
b08fe14dd7 Move core error handling docs to top-level
Kafka binder error channels docs cleanup
2024-03-08 17:40:12 -05:00
Soby Chacko
05b1eadd78 Docs cleanup 2024-03-08 15:59:56 -05:00
Soby Chacko
b595302f9c Cleanup default properties docs
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2906
2024-03-08 15:51:00 -05:00
Soby Chacko
c7b24a3d3c Pulsar binder integ test issues on JDK 21
* Disable the max-pending-messages in binderAndBindingPropsAreAppliedAndRespected test,
  since it is causing the test to fail on JDK 21. We will investigate why this propery has
  issues on JDK 21.

See this issue for details: https://github.com/spring-cloud/spring-cloud-stream/issues/2915
2024-03-07 11:50:49 -05:00
buildmaster
b0da1a7eec Bumping versions 2024-03-06 10:16:38 +00:00
Soby Chacko
48dcc5dfd7 Fixing Pulsar binder tests
* Fixing Pulsar binder tests for Boot 3.2/3.3 compatibility
2024-03-04 16:18:54 -05:00
Soby Chacko
cabefa74fa Adjust Pulsar binder code for Boot 3.2/3.3 2024-03-04 15:35:49 -05:00
spencergibb
6e168d92e6 formatting 2024-03-04 15:06:58 -05:00
Soby Chacko
650edc180c Fixing Kafka Binder unit test issues 2024-03-04 14:57:04 -05:00
Soby Chacko
fb430ce6bc Remove hard-coded jackson dependency in core 2024-03-04 14:07:49 -05:00
Soby Chacko
5f1611a4aa GH-2884: Docs on Pulsar Binder Config Props
Adding a brief docs section for the Pulsar binder config properties.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2884
2024-03-01 17:19:05 -05:00
babubabu
432ce8fdd2 Fixing empty truststore-config in KBCP
* do not copy truststore, if "ssl.truststore.location" is set to empty string (e.g. ssl.truststore.location:{ENV_VARIABLE}) via KafkaBinderConfigurataionProperties.
2024-02-28 17:23:32 -05:00
Soby Chacko
03a300b6c6 Cleanup in FunctionBatchingTests 2024-02-23 11:07:56 -05:00
Oleg Zhurakousky
4da70ef52b Checkstyle fix 2024-02-22 16:30:57 +01:00
Oleg Zhurakousky
3c15eca2c9 Fix executor termination in StreamBridge 2024-02-22 15:40:28 +01:00
LazroLeader
e7c1c7f769 Fixing concurrency issue in Kafka Streams binder
* Thread Safety Issue in serializeOnOutbound Method of KafkaStreamsMessageConversionDelegate 
* Wrapped perRecordContentTypeHolder with ThreadLocal
* update year and author
2024-02-15 15:58:07 -05:00
Artem Bilan
3e24d331db Rework observability for Rabbit Binder (#2903)
Fixes: #2901 

* Rework an observation for Rabbit Binder

The observation propagation doesn't work in multi-binder configuration

* Remove `ObservationAutoConfiguration` since it is not visible in case of multi-binder configuration
* Instead move `setObservationEnabled` flag setting to the `RabbitMessageChannelBinder`
* Add `io.micrometer.observation.ObservationRegistry` into `shared.beans` to make it visible for binder-specific application context
* Add `RabbitMultiBinderObservationTests` integration test where Rabbit Binder is in a multi-binder environment

As a side effect, this fixes an observation propagation for the Kafka binder as well in the multi-binder environment.
Its configuration is OK, but an `ObservationRegistry` must make it visible for the binder-specific application context.
See the mentioned `shared. beans`

Related to https://github.com/spring-cloud/spring-cloud-stream/issues/2901
Also see https://github.com/spring-cloud/spring-cloud-stream/issues/2902 for possible evolution

* Update the copyright of the affected classes
2024-02-14 18:53:06 -05:00
Artem Bilan
d620ff9838 Fix Checkstyle violations & typos in StreamBridge
Remove also a duplicated code from the `setAsync()`
which, essentially, may lead to the problem with class loader when `context-propagation` is optional on classpath
2024-02-14 16:50:32 -05:00
Oleg Zhurakousky
7fa72282c1 GH-2898 Add support for asyn send to StreamBridge 2024-02-14 21:17:27 +01:00
kutmk
4174657a35 Enable AutoConfiguration of TestChannelBinderConfiguration 2024-02-13 17:48:06 -05:00
Soby Chacko
539435a724 Fiing schema registry tests 2024-02-13 17:47:22 -05:00
Soby Chacko
977b5e3a4c Cleaning up Kafka Streams binder antora docs 2024-02-13 15:10:04 -05:00
Oleg Zhurakousky
e5ab77ebbf Ensure jackson-databind is boot managed 2024-02-12 14:41:51 +01:00
srinivasboini
4f69f05b82 GH-2882: Schema registry SSL config propagation
Fixes: #2882 

* Schema registry SSL config propagation to producer and consumer configurations
* Verify with tests
2024-02-08 16:43:29 -05:00
Soby Chacko
e903c47dac Cleanup in FunctionConfiguration 2024-02-06 14:26:26 -05:00
Soby Chacko
93cd52d29d KafkaTopicProvisioner - cleanup deprecation 2024-02-06 10:06:54 -05:00
Soby Chacko
b26c21aacf Fixing Kafka binder docs navigation 2024-02-01 18:49:13 -05:00
Soby Chacko
3f9162b8b4 GH-2882: Schema registry SSL config propagation
Fixes: https://github.com/spring-cloud/spring-cloud-stream/issues/2882

When providing schema registry SSL truststore and keystore properties
as classpath URL's under Kafka binder configuration, the transformations
of them into corresponding filesystem URL's are not currenlty propagated
into producerProperties and consumerProperties under binder configuration.
This is ncessary for certain serializer/deserializer to work.
See the related GH issue for more context on this.
2024-02-01 13:44:53 -05:00
Soby Chacko
959c372c4b Address deprecations in Kafka Streams binder 2024-02-01 12:51:14 -05:00
Soby Chacko
4d1c5965ed KafkaBinderConfigurationProperties cleanup
- Address deprecation
 - Minor cleanup
2024-01-31 13:26:16 -05:00
Soby Chacko
aea0e8f591 Kafka binder docs cleanup
Fixing a few broken links in config options docs
2024-01-26 15:59:25 -05:00
Soby Chacko
19735a31d2 Minor code cleanup in BindingServiceConfiguration 2024-01-22 17:36:56 -05:00
Soby Chacko
1cda3acb22 GH-2883: CCE from custom error channel bean
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2883

When an applicaiton provides a custom errorChannel bean that is not of type
`PublishSubscribeChannel`, the application fails to start with a CCE. This is
because `BindingServiceConfiguration` uses a hard cast on `PublishSubscribeChannel`
without pre-checking the channel type. Fixing this issue.
2024-01-22 17:22:21 -05:00
Soby Chacko
c72c548763 GH-2885: Channel used by StreamBridge missing name
Fixes https://github.com/spring-cloud/spring-cloud-stream/issues/2885

The `DirectWithAttributesChannel` used by `StreamBridge` is missing naming
information. Adding the proper application context and component name data
to the channel so that it is able to construct a name when queried.
2024-01-19 15:47:54 -05:00
Soby Chacko
75de93a95f Binding names docs refactoring 2024-01-18 17:59:16 -05:00
Artem Bilan
bec9a1c996 Fix Checkstyle violation in KafkaConfigCustomizationTests 2024-01-18 15:52:55 -05:00
Artem Bilan
b098929048 Fix generics for BinderCustomizer contract
The expectation is like this `Binder<T, C extends ConsumerProperties, P extends ProducerProperties>`
so, the `BinderCustomizer` must be in extension bounds as well.

* Move Javadocs from the `BinderCustomizer.customize()` to the class level
* Add `BinderCustomizer` verification to the `KafkaConfigCustomizationTests`
2024-01-18 15:46:17 -05:00
Soby Chacko
13552f624b GH-2794: AMCB ObjectMaper serialization issues
Fixes https://github.com/spring-cloud/spring-cloud-stream/issues/2794

The custom ObjectMapper used in AMCB is unable to serialize java.time.Duration
values. To fix this, the ObjectMapper needs to register the JavaTimeModule from
the jackson-datatype-jsr310 libarary.

Adding a test to verify the fix.
2023-12-21 17:18:54 -05:00
Soby Chacko
adf6e2f781 Tests cleanup - Pulsar binder
- See previous commit for more details
2023-12-13 16:34:43 -05:00
Soby Chacko
e908de1dfd GH-2870: Issues when closing multi-binder contexts
- When closing multi-binder contexts, the application throws a StackOverflow error
   due to an unnecessary addition of the binder child context as a separate bean
   in the main context. This was done previously for testing purposes.
 - Disabling the affected tests in the Pulsar binder until we come up with a
   different solution.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2870
2023-12-12 21:22:54 -05:00
“claudio-code”
1bfaed9471 Changed two links 2023-12-11 10:52:35 -05:00
Soby Chacko
95775b5eba Kafka Streams binder test cleanup 2023-12-08 17:32:14 -05:00
Soby Chacko
4d49a27cc1 Update Confluent platform docker images to 7.5.0 2023-12-08 16:45:55 -05:00