Commit Graph

240 Commits

Author SHA1 Message Date
Soby Chacko
92324641ef GH-2846: Regression issue in Kafka Streams binder
- When @Configuration or @Component style beans are used in Kafka Streams
   binder applications, there exists a regression that prevents the binder
   infrastructure to correctly detect the beans. Addressing this issue.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2846
2023-11-07 16:32:35 -05:00
Soby Chacko
b8e4885d21 Kafka Streams binder native changes
- RocksDBException and Status need INVOKE_DECLARED_CONSTRUCTOR privileges
2023-11-03 14:37:10 -04:00
Soby Chacko
36a43be235 package protected tests in rabbit binder 2023-11-02 15:34:17 -04:00
Soby Chacko
462d42b3ad package protected test classes - Pulsar binder 2023-11-02 15:10:03 -04:00
Soby Chacko
116d8dc535 [Test Cleanup - Package Private]
- spring-cloud-stream-binder-kafka-streams module tests
2023-11-02 14:29:25 -04:00
Soby Chacko
6af434c18a [Test Cleanup - Package Private]
- spring-cloud-stream-binder-kafka-reactive module tests
2023-11-01 15:44:21 -04:00
Soby Chacko
515923266e [Test Cleanup - Package Private]
- spring-cloud-stream-binder-kafka-core module tests
2023-11-01 15:38:07 -04:00
Soby Chacko
60dfce7adc [Test Cleanup] Kafka binder tests package private 2023-11-01 15:32:28 -04:00
buildmaster
9054367f67 Going back to snapshots 2023-10-31 13:34:17 +00:00
buildmaster
b3a3e03634 Update SNAPSHOT to 4.1.0-RC1 2023-10-31 13:30:45 +00:00
Soby Chacko
c994dd5ab1 checkstyle fixes 2023-10-27 16:12:31 -04:00
Soby Chacko
503da99b19 Test cleanup in Kafka binder
- Remove the unncessary usage of @ExtendWith in Kafka binder tests
2023-10-26 17:55:25 -04:00
Soby Chacko
e8431e4600 AOT/Native related changes in Kafka Streams binder
- Add KafkaStreams related native hints (Note: Once we add the
   Kafka Streams specific 3rd party hints to the reachability
   metadata repository, we will remove those hints from the binder)
 - Related changes in DefaultBinderFactory
 - KafkaStreamsBindableProxyFactory changes triggered by AOT/native

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

Addressing PR review comments
Resolves #2832
2023-10-20 16:50:47 +02:00
Steven PG
4a4ce6975a Add DltAwareProcessor trace logging
Since exception is not propogated, adding a trace log allows an optional way for a developer to utilize the defaultRecoverer and still do some basic review of a given exception.
2023-10-18 22:09:48 -04:00
Soby Chacko
a74ea9fe87 Introduce a hierarchy for DltAwareProcessor
- Common abstraction - RecordRecoverableProcessor which DltAwareProcessor extends
2023-10-17 13:02:55 -04:00
Soby Chacko
04e27d1bbe AOT required changes in Kafka Streams binder 2023-10-13 17:32:24 -04:00
Soby Chacko
4b53c839ac Sending record keys as part of DltAwareProcessor 2023-10-12 20:26:32 -04:00
Soby Chacko
d650f9e1e8 Kafka Streams binder code cleanup
- Remove deprecated API usage
 - Other cleanup
 - EmbeddedKafka changes in tests
2023-10-09 21:12:27 -04:00
Soby Chacko
cf6cea6525 GH-2817: Method name clash in Kafka Streams binder
- When there are two methods with the same name but with different type erasures,
   Kafka Streams binder sometimes detects the incorrect method. Fixing this issue
   by specifically type checking the return type for Kafka Streams types.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2817
2023-09-29 21:24:31 -04:00
Soby Chacko
3a52c3b3cf GH-2821: Kafka Streams branching as Component bean
- When Kafka Streams branching function is provided as a Component bean,
   there is an issue where the raw class check on the return outbound
   resolvable type cuases an NPE. Fixing this issue by adding a null check
   on the return type's raw class.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2821
2023-09-29 16:27:04 -04:00
Soby Chacko
895570fb48 Code cleanup: AbstractKafkaStreamsBinderProcessor
- Remove deprecation warnings
 - Other code cleanup
2023-09-29 15:33:09 -04:00
Soby Chacko
5ea391beb0 GH-2823: Messages routed to the wrong consumer
- When event-type routing is enabled in Kafka Streams binder
   and conurrency > 1 is used, messages are occasionally getting
   dispatched to the wrong consumer causing CCE. This is due
   to a race condition caused by a shared resource across threads.
   Fixing the issue by introducing a ThreadLocal variable.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2823
2023-09-29 10:43:43 -04:00
buildmaster
cd0e3c1a38 Going back to snapshots 2023-09-27 10:33:44 +00:00
buildmaster
ecaf757a38 Update SNAPSHOT to 4.1.0-M2 2023-09-27 10:29:34 +00:00
Soby Chacko
bca3dd5566 DltAwareProcessor improvements
- Instead of using a BiFunction as a delegate, use standard Function that takes the full record
 - Remove Supplier<Long> that was used to handle record time stamps since this is no longer needed
 - Docs cleanup
2023-09-26 21:34:22 -04:00
Chris Bono
ca2d3046b9 Remove Boot version from Pulsar binder pom.xml (#2819) 2023-09-26 09:33:44 -05:00
Chris Bono
b51e9e408b Update Pulsar binder to Spring Boot 3.2.0-M3 (#2818) 2023-09-26 09:07:20 -05:00
Oleg Zhurakousky
38ce1f79d9 Fix property value type 2023-09-26 07:09:46 +02:00
Soby Chacko
aeb88d01e9 KafkaBinderTests cleanup
- Remove deprecations
 - Other minor cleanup
2023-09-21 15:34:32 -04:00
Chris Bono
1ef65b340d Polish "GH-2806: Pulsar binder defaults properties config" 2023-09-21 10:01:40 -05:00
Soby Chacko
34aae4b62d GH-2806: Pulsar binder defaults properties config
- Ensure that the Pulsar binder default properties can be properly
   expressed via spring.cloud.stream.pulsar.default property prefix.
 - Add the binder child context bean with the name binderName_binderProducingContext
   into the parent application context so that individual beans from the binder context
   can be easily queried.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2806
2023-09-21 09:37:54 -05:00
Soby Chacko
e06d4eedfd GH-2662: Kafka binder DLQ root cause message (#2812)
- Becasue NestedRuntimeException from Spring Framework core 6.x removed
   the getMessage method that included the detailMessage with cause in it,
   the Kafka binder DLQ records no longer include the cause message.
   Fix this issue by including the cause in the exception message.

See this comment for more details:
 - https://github.com/spring-cloud/spring-cloud-stream/issues/2662#issuecomment-1722849892
This fix is based on the following Spring Kafka commit.
 - 6f585058a6

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2662
2023-09-20 11:28:13 -04:00
Chris Bono
db54f5e730 Update Pulsar binder to use new Spring Pulsar starter.
The PulsarBinder relies on the Spring Pulsar Spring Boot starter.
The starter moved out of the spring-pulsar core repo and into
Spring Boot proper. This commit updates the Pulsar binder to
use the new coordinates for the Spring Boot based starter.

* Additionally, the PulsarProperties were greatly reduced in the
  move to Spring Boot. As such, the binder exposes an extended
  set of config properties for producer/consumer (the initial
  set supported before the property reduction).
2023-09-14 10:33:06 -04:00
Soby Chacko
3c65104b1d GH-2796: Fix partition count related issues (#2807)
If a target middleware (Kafka for ex) topic has more partitions
than what is set on the partition-count producer property, the binder
never updates the original producer partition-count property to the
partition count from the middleware if it is higher than what was given
through the property. Because of this, te PartitionAwareFunctionWrapper
which evaluates and assigns the partition header in Spring Cloud Stream
does not compute the correct partition since the hash operation still
using the original partition-count from the producer binding property.
This commit is addressing this issue.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2796
2023-09-14 08:52:14 -04:00
Soby Chacko
b5f9c5093b Kafka binder RuntimeHints
- Adding missing runtime hints for Kafka binder properties

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2604
2023-09-08 18:27:24 -04:00
Soby Chacko
26597db5b0 KafkaBinderHealthIndicator Changes
- Set considerDownWhenAnyPartitionHasNoLeader to true by default

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2760
2023-09-08 14:51:17 -04:00
Soby Chacko
bec40fba89 KafkaBinderConfigurationProperties native changes
- Earlier, we had to add Autowired on KafkaBinderConfigurationProperties constructor
   as there were some issues with runtime hints generation which caused issues when
   running an app in native mode. Spring Boot fixed these issues and we can remove
   this unnecessary Autowired from the constructor.

See the following issues from Spring Boot for more details.

https://github.com/spring-projects/spring-boot/issues/34507
https://github.com/spring-projects/spring-boot/issues/35564

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2640
2023-09-07 16:54:09 -04:00
Soby Chacko
d822129d67 DltAwareProcessor enhancements
Cleaning up the code for the custom DltAwareProcessor
2023-09-06 20:36:35 -04:00
Gyurian Norbert
0949d4e145 GH-2761: Support non-CLASSPATH based certificates
If kafka truststore and keystore locations are not local files, then they
are converted to org.springframework.core.io.Resource resources, then copied
to local file system. This means that, paths can be defined as HTTP resources too.
Currently, the Kafka binder only supports CLASSPATH based resources. It would be
useful if we can support non-CLASSPATH like resources such as HTTP, so that if an
application uses config server for example to store certificates, then those will
be copied from it's HTTP endpoint to the local filesystem as Resources.

Checkstyle, documentation fixes.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2761
2023-09-05 12:58:42 -04:00
Soby Chacko
acc8b1cb92 KafkaNull Test Changes
There was a regression introduced in Spring Cloud Function where consumers
of type Consumer<Message<?>> receive null values when tombstone records
are given as KafkaNull.

See this issue for more details: https://github.com/spring-cloud/spring-cloud-function/issues/1060

Regression is addressed in Spring Cloud Function and
making the corresponding test changes in Spring Cloud Stream Kafka binder.
2023-08-30 12:38:39 -04:00
Soby Chacko
8b7accac2a Renable Pulsar binder 2023-08-29 16:37:25 -04:00
Soby Chacko
3b4e1795c3 KafkaJaasLoginModuleInitializer init changes
- Insted of unconditionally initializing KafkaJaasLoginModuleInitializer,
   only create it, if jaas properties are set properly. By creating it always,
   we unncessarily expose Java security related class requirements to the binder
   apps. For e.g. if the underlying JVM security classes change and require
   reflection, that could break AOT apps that don't use a secure Kafka cluster.
   Fixing these type of issues by creating KafkaJaasLoginModuleInitializer only if required.
2023-08-10 12:18:16 -04:00
buildmaster
6c28820e8e Going back to snapshots 2023-08-10 01:30:10 +00:00
buildmaster
4743859cd7 Update SNAPSHOT to 4.1.0-M1 2023-08-10 01:26:38 +00:00
spencergibb
76332e1e42 jenkins/releaser hacking 2023-08-09 16:08:30 -04:00
spencergibb
2380afbe1f fixes checkstyle issues 2023-08-09 15:48:56 -04:00
spencergibb
7505144fcb Ignores pulsar-binder snapshot temporarily
The module is disabled
2023-08-09 15:26:10 -04:00
spencergibb
a45a2811e0 Disables pulsar-binder temporarily 2023-08-09 15:22:10 -04:00
Soby Chacko
7905601e51 DltAwareProcessor constructor changes 2023-07-24 15:14:38 -04:00
Soby Chacko
6bb4da89ce DLTAwareProcessor (Kafka Streams binder) changes
- Optional BiConsumer for processor record recoverer
 - Optional Supplier for downstream record timestamp
2023-07-24 15:04:57 -04:00