- 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
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
When sendto header is used for dynamic destinations
and a partition key extractor is given for binder based
partitioning, then the partition key extractor is not invoked
when publishing the message. Addressing this issue.
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2770
- In StreamBridge send method, there is a path, in which it
tries to find the partition information twice, causing it
to throw errors when using patition key expresson that
involves the payload. This is because, the second time it
tries to find the partition, the payload is already converted
into byte[]. This second partition finding is unncessary.
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2759
- When using reactive functions, partition selector strategy does not
use the configured partition count for multiple outbounds. This is
because we take the first configured output binding and apply it's
partition counts on all the outbound reactive streams (Tuples).
Addressing this issue by properly applying the correct partition handling
per output binding.
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2750
- The BinderChildContextInitializerTests is failing in Jenkins but not locally. This adds temporary sout to the test in order to see what the issue is in the child context creation.
* Reactive Kafka Binder errors when concurrency > 1
When using Reactive Kafka binder, it is allowed to have concurrency > 1.
There is a check in FunctionConfiguration that throws an error if concurrency
is > 1, when using reactive types. Since it is allowed to do so with
Reative Kafka binder, switch this conversion into a warning log message.
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2726
* Update core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/function/FunctionConfiguration.java
Co-authored-by: Gary Russell <grussell@vmware.com>
* Update core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/function/FunctionConfiguration.java
Co-authored-by: Gary Russell <grussell@vmware.com>
* Update core/spring-cloud-stream-integration-tests/src/test/java/org/springframework/cloud/stream/function/ImplicitFunctionBindingTests.java
Co-authored-by: Gary Russell <grussell@vmware.com>
---------
Co-authored-by: Gary Russell <grussell@vmware.com>
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2706
- Update partition count changes in Kafka dynamically during runtime
- Checkstyle fixes
- PartitionHandler changes
- Improved handling of expression with 'payload' in the logic
- Removed getter/setter for PartitionHandler and use ReflectionUtils within Test
- Renamed property to 'dynamicPartitionUpdatesEnabled' and improved documentation (also one line per sentence)
- Improved/renamed test to use embeddedkafka and really test update behaviour
- Javadoc