- 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
- 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
- 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
- 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
- When StreamBridge#send is called with binder-name and custom content-type,
it does not honor the content-type value, but default to application/json.
Fixing this issue for this call path by explicitly checking for any custom
content-type provided on the binding.
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2805Resolves#2813
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).
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
When building in AOT mode, the BinderChildContextInitializer is unable to get access
to a SpEL expression conversion service in order to properly bind spring.cloud.stream
prefixed properties with values containing SpEL expressions such as headers[partition-key-expression].
However, we don't need to bind at this level of generality (spring.cloud.stream.*) in the
BinderChildContextInitializer since we are only looking for the user defined binders there.
To fix the issue, this commit explicitly binds only the spring.cloud.stream.binders.* properties
and ignores any other binding properties via spring.cloud.stream prefix. Any such conversions
will be done in later phases after the binder contexts are created.
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2799