Commit Graph

895 Commits

Author SHA1 Message Date
Soby Chacko
394b8a6685 Restore autoCommitOffset behavior
Until autoCommitOffset is fully removed (it is deprecated already in 3.1),
honor the old behavior if the application uses the property.

Restore autoCommitOnError from deprecated status to active for polled consumers.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1026
2021-02-09 17:48:56 -05:00
Soby Chacko
32939e30fe AdminClient customizer (#1023)
* AdminClient customizer

Provide the ability for applications to customize AdminClient by
introducing a new interface AdminClientConfigCustomizer.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1014

* Addressing PR review comments
2021-02-03 10:25:03 -05:00
Surendra Galwa
cadb5422cc Fix property name in startOffset 2021-01-27 17:27:25 -05:00
buildmaster
99880ba216 Bumping versions to 3.1.2-SNAPSHOT after release 2021-01-27 17:52:34 +00:00
buildmaster
9e9e0f7ea3 Going back to snapshots 2021-01-27 17:52:34 +00:00
buildmaster
e1648083e6 Update SNAPSHOT to 3.1.1 v3.1.1 2021-01-27 17:51:08 +00:00
Soby Chacko
87491118c3 Update spring-cloud-build parent 2021-01-22 15:59:11 -05:00
Soby Chacko
cf7acb23e8 Update Kafka dependencies 2021-01-22 15:12:29 -05:00
Soby Chacko
1fbb6f250e Make health indicator beans public
Currently, the health indicator beans for both binders are not
customizable due to package visibility issues. Making them public.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1015
2021-01-19 11:01:41 -05:00
Inigo
ae4abe4f33 fix property name in consuming batches 2021-01-06 14:54:08 -05:00
Marco Leichsenring
5d312228db Fix topic name confg in docs 2021-01-06 14:52:44 -05:00
Mehmet
69c5b67126 removed j letter from exception message
Not sure, but it seems like a typo.
2021-01-06 14:51:55 -05:00
Soby Chacko
83cfdfc532 Fix checkstyle issues 2021-01-05 16:33:15 -05:00
Soby Chacko
c6154eecfc Update copyright year for a previous commit 2021-01-05 16:02:56 -05:00
Soby Chacko
f8a4488a0e Update Kafka Streams binder health indicator
Update the health indicator code for Kafka Streams binder
to the latest changes made in the 3.0.x branch.
2021-01-05 15:58:24 -05:00
Soby Chacko
ffde5d35db Kafka Streams binder health indicator improvements
When using multi binder setup in Kafka Streams binder, there is an issue
in which the binder health indicator is not getting bootstapped due to a
ConditionalOnBean is unable to find a match for KafkaStreamsRegistry bean.
Fixing this issue by using an ObjectProvider instead of ConditionalOnBean.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1006
2021-01-05 15:55:40 -05:00
Oleg Zhurakousky
5921d464ed Fix snapshot versioning schema 2020-12-21 15:46:10 +01:00
buildmaster
023d3df7f7 Bumping versions to 3.1.1.SNAPSHOT after release 2020-12-21 12:28:52 +00:00
buildmaster
846534fe84 Going back to snapshots 2020-12-21 12:28:52 +00:00
buildmaster
2eedc8a218 Update SNAPSHOT to 3.1.0 v3.1.0 2020-12-21 12:27:25 +00:00
buildmaster
49d263eafc Going back to snapshots 2020-12-11 15:12:31 +00:00
buildmaster
94f398a3e4 Update SNAPSHOT to 3.1.0-RC1 v3.1.0-RC1 2020-12-11 15:11:13 +00:00
Soby Chacko
7cba801bef Checkstyle cleanup 2020-12-10 21:35:16 -05:00
Soby Chacko
db14154398 Cleanup docs in Kafka Streams binder
- Add StreamListener deprecation notice in docs

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1005
2020-12-10 21:30:57 -05:00
Soby Chacko
386a361a66 Event type based routing in Kafka Streams binder
Introducing the capability of routing records based on
event types. If a header in the incoming record contains
the event type set on the binding, then the function
associated with that binding gets invoked.

Adding test/docs.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/1003
2020-12-10 21:18:00 -05:00
hemeda3
27cb6f4b5f Fixed typo springc to spring
Fixed typo `springc` to `spring` in two lines: 
`spring.cloud.stream.function.bindings.process-in-0=users`
`spring.cloud.stream.function.bindings.process-in-0=regions`
2020-12-09 14:23:05 -05:00
Soby Chacko
58ac92ec71 Fix broken documentation links
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/986
2020-12-04 18:09:32 -05:00
Soby Chacko
d1c62bbc26 Kafka Streams binder producer/consumerProperties
Fix the issue of Kafka Streams binder level producerProperties
and consumerProperties (...binder.producerProperties and
...binder.consumerProperties), are not taken into consideration.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/997
2020-12-04 17:54:54 -05:00
Soby Chacko
afe13cc045 Adding docs for Meter filtering
KafkaBinderMetrics docs for meter fitlering.
Refact METRIC_NAME to OFFSET_LAG_METRIC_NAME and make it public.
2020-12-04 16:52:20 -05:00
Soby Chacko
42c9af019e Prodcer/Consumer config customizer changes
* Provide binding and destination names to the configure method
  in ProducerConfigCustomizer and ConsumerConfigCustomizer
  so that those can be used in the customization.
* Modify tests and docs

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/996
2020-12-04 16:16:10 -05:00
Soby Chacko
675c2e4940 KafkaBinderMetrics NoopGauge/filtering changes (#1001)
* KafkaBinderMetrics NoopGauge/filtering changes

Fixing the problem of KafkBinderMetrics scheduled task
for finding the offset lag gets triggered, even when the
guage is registered as a NoopGague in the MeterRegistry.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/995

* Addressing PR review comments

* Fix typo
2020-12-04 16:04:09 -05:00
Soby Chacko
a1b31e67c4 Support allowNonTransactional config
Add a new producer extended property for allowNonTransactional.
When set to true, records published to this output binding will
not be run in a transaction, unless one is already in process.

By default, all ouput bindings associated with a transactional
binder publishes in a new transaction. This new property can be
used to override this behavior.

Addressing PR review comments.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/990
2020-12-04 11:49:13 -05:00
Soby Chacko
5a7cc9f257 Fix Serde inference issues in Kafka Streams binder
When there are multiple functions present with different outbound target types,
there is an issue of one function overriding the target type of a previous function
in the catalogue where the binder stores the target type information.
This causes problems for the binder initiated Serde inference. Addressing the issue.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/994
2020-12-03 19:43:07 -05:00
Soby Chacko
fc184ba422 Setters for fields that need customization
See this commit in core fore details:

442c72b37c
2020-11-20 14:38:36 -05:00
Taras Danylchuk
526627854a Altering existing topics only allowed if opt-in
Altering existing topic configurations based on a new binder property.
Existing topic configurations are only modified if `autoAlterTopics` is
enabled. By default, this is disabled.

Adding tests to verify.

Docs.

Logging level changes.

Checkstyle fixes
2020-11-19 15:36:09 -05:00
Soby Chacko
6be541c070 Copy cert files from classpath to file-system (#989)
* Copy cert files from classpath to file-system

If `ssl.truststore.location` and `ssl.keystore.location` are
provided as classpath resources, convert them to absolute paths
on the filesystem. This is because of a restriction in the Kafka client
in which it does not allow certificates to be read from the classpath.

See these issues for more details:
https://issues.apache.org/jira/browse/KAFKA-7685
https://cwiki.apache.org/confluence/display/KAFKA/KIP-398%3A+Support+reading+trust+store+from+classpath

This commit allows the Spring Cloud Stream application to provide the
cert files as classpath: reosources, but the binder internally move
them to a locations on the local filesystem and then use that absolute
path as the value for cert locations. Adding properties for optional paths
to move the files to. If no values are provided for these properties,
then use the system's /tmp directory.

Adding tests and docs.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/985

* Addressing PR review comments

* Addressing further PR review comments

* Consolidate keystore/truststore filesystem locations into a single property

* Addressing PR review
2020-11-17 13:49:04 -05:00
buildmaster
1afb22d65f Going back to snapshots 2020-11-17 16:04:44 +00:00
buildmaster
097fb89d9e Update SNAPSHOT to 3.1.0-M4 v3.1.0-M4 2020-11-17 16:03:30 +00:00
Oleg Zhurakousky
0ad0a31b4e Disabled JAAS test 2020-11-17 16:53:27 +01:00
Oleg Zhurakousky
19e97dd9c4 Update versions of spring kafka and spring integration kafka 2020-11-17 16:26:07 +01:00
gustavomonarin
676764b923 Fix documentation for kafka streams concurrency on binder level
The property spring.cloud.stream.binder.configuration.num.stream.threads does not work and is silently ignored.

The property spring.cloud.stream.kafka.streams.binder.configuration.num.stream.threads works fine and  is already covered by tests at MultipleFunctionsInSameAppTests#125

resolves #987
2020-11-11 13:55:35 -05:00
Soby Chacko
d8a678c77e Fix KafkaBinderTests - testRecordMetadata 2020-11-11 13:40:19 -05:00
Soby Chacko
23ce9e3d6e Fix NPE in Kafka Streams binder
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/981
2020-11-05 12:34:59 -05:00
Soby Chacko
73921db3ec Fixing test failure
Fixing Kafka Streams binder retry tests due to a
wrong conditional check.
2020-11-05 11:05:22 -05:00
Soby Chacko
f1e3a0bdd6 Allow retries in Kafka Streams binder (#980)
* Allow retries in Kafka Streams binder

Provide applications the capability to retry critical sections of the
business logic. This is accomplished through a new API using which
critical path can be wrapped inside a Callable.

Adding tests and docs.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/945

* Reworking the PR

Remove the binder API that was added before for retrying.
Reuse binding provided RetryTemplate.

Tests and docs

* Cleanup

* Addressing PR review comments

* Fix typo
2020-10-30 16:39:49 -04:00
Soby Chacko
97e3b61d14 Adding improvements to InteractiveQueryService
New API additions.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/942
2020-10-28 18:58:18 -04:00
Soby Chacko
50f4470fcf Update deprecated API usage in InteractiveQueryService
Use queryMetadataForKey instead of metadataForKey

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/941
2020-10-28 15:24:09 -04:00
Soby Chacko
45f1927c6f Expand messageKeyExpression docs (#978)
* Expand messageKeyExpression docs

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/972

* Update docs/src/main/asciidoc/overview.adoc

Co-authored-by: Gary Russell <grussell@vmware.com>

Co-authored-by: Gary Russell <grussell@vmware.com>
2020-10-27 11:10:33 -04:00
Soby Chacko
0a0d3a1057 Remove duplicate KafkaStreams topology endpoint
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/895
2020-10-22 12:31:40 -04:00
Soby Chacko
5cdd8a09f9 Custom DLQ Destination Resolver (#976)
* Custom DLQ Destination Resolver

Allow applications to provide a custom DLQ destination resolver
implementaiton by providing a new interface DlqDestinationResolver
as part of binder's public contract. This interface is a BiFunction
extension using which the applications can provide more fine grained
control over where to route records in error.

Adding test to verify.

Adding docs.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/966

* Add DlqDestinationResolver to MessageChannel based binder.

Tests and docs
2020-10-21 12:02:02 -04:00