Commit Graph

735 Commits

Author SHA1 Message Date
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
Soby Chacko
514530db22 Upgrade dependencies
Spring Kafka -> 2.6.3-SNAPSHOT
Spring Integration Kafka -> 5.4.0-SNAPSHOT
Kafka version -> 2.6.0
Use Kafka_2.13 for tests

Ungignore the Jaas security tests.
Unignore a few Kafka Streams binder tests.
2020-10-16 16:44:32 -04:00
Gary Russell
50ec8f0919 Change Log etc. Replication Factor
If the user has not explicitly set the `SreamsConfig.REPLICATION_FACTOR_CONFIG`,
set it from the binder property.

This is used for infrastructure topics (change logs and repartition topics).
2020-10-15 16:22:41 -04:00
Gary Russell
829d1c651a GH-968: Propagate Application Context
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/968
2020-10-12 13:59:25 -04:00
Soby Chacko
200a5efb64 Simplifying bootstrap-server config evaluation
If both boot and binder level config for bootstrap servers are present, the boot
one always wins currently regardless of any binder settings, unless the boot one
evaluates to the default (localhost:9092). This is especially a problem in a
multi binder scenario. Addressing this issue by simplifying the evaluation and
always gives the binder config the highest precedence.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/967
2020-10-12 13:18:47 -04:00
Soby Chacko
7f3a7f856f Kafka binder metrics improvements (#965)
* Kafka binder metrics improvements

KafkaBinderMetrics has a blocking call in which it waits for the default timeout of
60 seconds if Kafka broker is down. This happens for each topic within a consumer
group. Refactor this code, so that we have this check performed in a periodic task
and if the runtime check fails to return within a smaller timewindow (5 seconds),
return immediately by providing the latest value from the periodic task results.

Periodic task for computing the lags is run every 60 seconds.

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

* Addressing PR review
2020-10-05 13:19:01 -04:00
buildmaster
1358bdfeec Going back to snapshots 2020-10-02 14:10:39 +00:00
buildmaster
f8dac888e4 Update SNAPSHOT to 3.1.0-M3 v3.1.0-M3 2020-10-02 14:09:20 +00:00
Soby Chacko
50380dae69 Ignore a few Kafka Streams tests temporarily 2020-10-02 09:12:22 -04:00
Oleg Zhurakousky
23b9d5b4c6 Temporary disable failing tests 2020-10-02 12:59:18 +02:00
buildmaster
7bebe9b78f Bumping versions 2020-09-25 10:42:44 +00:00