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.
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.
- When native encoding is used, StreamBridge is not setting
partitioning interceptor which calls the PartitionHandler.
This is a regression issue and adding the interceptor explicitly
when native encoding is used.
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2815Resolves#2831
- 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>