- 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
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
- 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
* 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>
There are some use-cases when we need to know upfront
if specific binding is really bound.
The goal is to prevent some security vulnerabilities
when too many unexpected dynamic bindings, e.g.
via router based on the `StreamBridge`.
The `BindingService` provides for us `getProducerBindingNames()`
and `getConsumerBindingNames()` which are not optimal
for the task to check for binding presence
* Introduce `BindingService.getProducerBinding(String bindingName)`
and `getConsumerBindings(String bindingName)` to cover a use-case
when we need to check for predefined bindings.
This API might be useful in other use-case when we need to get
access to managed bindings
Related to: https://github.com/spring-cloud/stream-applications/issues/330