The test testDlqWithNativeSerializationEnabledOnDlqProducer fails on CI occasionally.
Adding a sleep of 1 second to give the retrying mechanism enough time to complete.
There are issues when a bean declared as a function in the Kafka Streams
application tries to autowire a bean through method parameter injection.
Addressing these concerns.
Resolves#726
Use BeanFactoryUtils.beanNamesForTypeIncludingAncestors instead of
getBean from BeanFactory which forces the bean creation inside the
function detector condition. There was a race condition in which
applications were unable to autowire beans and use them in functions
while the detector condition was creating the beans. This change will
delay the creation of the function bean until it is needed.
When using the Kafka Streams binder, if the application chooses to
provide bootstrap server configuration through Kafka binder broker
property, then allow that. This way either type of broker config
works in Kafka Streams binder.
Resolves#401Resolves#720
Generate a random application id for Kafka Streams binder if the user
doesn't set one for the application. This is useful for development
purposes, as it avoids the creation of an explicit application id.
For production workloads, it is highly recommended to explicitly provide
and application id.
The gnerated application id follows a patter where it uses the function bean
name followed by a random UUID string which is followed by the literal appplicaitonId.
In the case of StreamListener, instead of function bean name, it uses the containing class +
StreamListener method name.
If the binder generates the application id, that information will be logged on the console
at startup.
Resolves#718Resolves#719
When joining two input KStreams, the binder throws an exceptin.
Fixing this issue by passing the wrapped target KStream from the
proxy object to the adapted StreamListener method.
Resolves#701
* Handle Deserialization errors when there is a key
Handle DLQ sending on deserialization errors when there is a key in the record.
Resolves#635
* Adding keySerde information in the functional bindings
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/683
If the `messageKeyExpression` references the payload or entire message, add an
interceptor to evaluate the expression before the payload is converted.
The interceptor is not needed when native encoding is in use because the payload
will be unchanged when it reaches the adapter.
- change `TopicPartitionInitialOffset` to `TopicPartitionOffset`
- when resetting with manual assignment, set the SeekPosition earlier rather than
relying on direct updat of the `ContainerProperties` field
- set `missingTopicsFatal` to `false` in mock test to avoid log messages about missing bootstrap servers
* Introduce the ability to provide BiFunction beans as Kafka Streams processors.
* Bypass Spring Cloud Function catalogue for bean lookup by directly querying the bean factory.
* Add test to verify BiFunction behavior.
Resolves#690
This PR introduces some fundamental changes in the way functional model of Kafka Streams applications
are supported in the binder. For the most part, this PR is comprised of the following changes.
* Remove the usage of EnableBinding in Kafka Streams based Spring Cloud Stream applications where
a bean of type java.util.function.Function or java.util.function.Consumer is provides (instead of
a StreamListener). For StreamListener based Kafka Streams applications, EnableBinding is still
necessary and required.
* Target types (KStream, KTable, GlobalKTable) will be inferred and bound by the binder through
a new binder specific bindable proxy factory.
* By deault input bindings are named as <functionName>-input for functions with single input
and <functionName>-input-0...<functionName>-input-n for functions with n-1 number of inputs.
* By deault output bindings are named as <functionName>-output for functions with single output
and <functionName>-output-0...<functionName>-output-n for functions with n-1 number of outputs.
* If applications prefer custom input binding names, the defaults can be overridden through
spring.cloud.stream.function.inputBindings.<funcationName>. Similarly if custom outpub binding names
are needed, then that can be done through spring.cloud.streamfunction.outputBindings.<functionName>.
* Test changes
* Refactoring and polishing
Resolves#688
* Upgrade Kafaka versions used in tests.
* EmbeddedKafkaRule changes in tests.
* KafaTransactionTests changes (createProducer expectations in mockito).
* Kafka Streams bootstrap server now return an ArrayList instead of String.
Making the necessary changes in the binder to accommodate this.
* Kafka Streams state store tests - retention window changes.
* Topic provisioning for consumers ignores topic.properties settings if binding type is KTable or GlobalKTable
* Modify tests to verify the behavior during KTable/GlobalKTable bindings
* Polishing
Resolves#687