You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
After upgrading to version 4.0.4 we noticed that default partitioning is not working as expected (key.hashCode() % partitionCount) when using StreamBridge. It can be possibly associated with this commented block:
// Commenting out the following block due to this issue: https://github.com/spring-cloud/spring-cloud-stream/issues/2759
. Before, if condition is met, DefaultPartitionInterceptor was added and partitionHandler.determinePartition(message) was called, which is not the case now in version 4.0.4.
To Reproduce
We are using Spring Cloud Stream functions. The message key is a very simple record schema.
Invalid value io.confluent.kafka.serializers.KafkaAvroSerializer for configuration key.serializer: Class io.confluent.kafka.serializers.KafkaAvroSerializer could not be found.
at org.apache.kafka.common.config.ConfigDef.parseType(ConfigDef.java:744) ~[kafka-clients-3.5.1.jar:na]
at org.apache.kafka.common.config.ConfigDef.parseValue(ConfigDef.java:490) ~[kafka-clients-3.5.1.jar:na]
. . . .
If you want us to look at the issue please provide a way to reproduce it. The best thing you can do is create a small project with reproducible code an push it to github so we can take a look.
- 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.
Resolvesspring-cloud#2815
- 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#2815Resolves#2831
Describe the issue
After upgrading to version
4.0.4
we noticed that default partitioning is not working as expected(key.hashCode() % partitionCount)
when using StreamBridge. It can be possibly associated with this commented block:spring-cloud-stream/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/function/StreamBridge.java
Line 263 in e06d4ee
DefaultPartitionInterceptor
was added andpartitionHandler.determinePartition(message)
was called, which is not the case now in version4.0.4
.To Reproduce
We are using Spring Cloud Stream functions. The message key is a very simple record schema.
Steps to reproduce the behavior:
We have used
KafkaNull.INSTANCE
but it's the same behaviour with the regular message.4. See the failed assertion
Version of the framework
SpringBoot 3.1.2
SpringCloudStream 4.0.4
Expected behavior
When using defaults partition should be selected based on the following function:
(key.hashCode() % partitionCount)
.The text was updated successfully, but these errors were encountered: