Commit Graph

895 Commits

Author SHA1 Message Date
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
Oleg Zhurakousky
c44c17008c Fix docs links 2020-09-24 16:22:55 +02:00
Soby Chacko
33fa713a9f Customizing producer/consumer factories (#963)
* Customizing producer/consumer factories

Adding hooks by providing Producer and Consumer config
customizers to perform advanced configuration on the producer
and consumer factories.

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

* Addressing PR review comments

* Further PR updates
2020-09-23 13:21:31 -04:00
Soby Chacko
769ed56049 Deprecate autoCommitOffset in favor of ackMode (#957)
* Deprecate autoCommitOffset in favor or ackMode

Deprecate autoCommitOffset in favor of using a newly introduced consumer property ackMode.
If the consumer is not in batch mode and if ackEachRecord is enabled, then container
will use RECORD ackMode. Otherwise, use the provided ackMode using this property.
If none of these are true, then it will defer to the default setting of BATCH ackMode
set by the container.

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

* Address PR review comments

* Addressing PR review comments
2020-09-21 11:16:51 -04:00
Heiko Does
859952b32a GH-951 update TopicConfig when diffrent from topic properties
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/951
2020-09-11 16:02:52 -04:00
cleverchuk
1e9aa60c4e Fix Health indicator/partition leader issues
* Fix health indicator to properly indicate partition failure
 * Add new flag to control binder health indicator behavior
 * Regardless of the consumer that is reading from a partition, if the binder
   detects that a partition for the topic is without a leader, mark the binder
   health as DOWN (if the flag is set to true).
 * Remove synchronize block since only one thread executes the block
 * Add Docs for the new binder flag
 * Fix checkstyle issues
2020-09-11 12:06:28 -04:00
Soby Chacko
4161f875ed Change default replication factor to -1 (#956)
* Change default replication factor to -1

Binder now uses a default value of -1 for replication factor signaling the
broker to use defaults. Users who are on Kafka brokers older than 2.4,
need to set this to the previous default value of 1 used in the binder.

In either case, if there is an admin policy that requires replication factor > 1,
then that value must be used instead.

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

* Addressing PR review comments
2020-08-28 12:18:53 -04:00
Soby Chacko
f2e543c816 Remove unnecessary configs from binder
Following two properties are removed from the producer configs in the binder.

(ProducerConfig.RETRIES_CONFIG, 0)
(ProducerConfig.BUFFER_MEMORY_CONFIG, 33554432)

In the case of RETRIES, this is a bug to override the default in Kafka client (MAX_INT) and
in the latter case, this is unnecessary as this is the same default in the client.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/952
2020-08-26 18:00:45 -04:00
Soby Chacko
ac4d9298c9 Fix test failures in KafkaBinderMeterRegistryTest 2020-08-26 17:11:49 -04:00
ncheema
34c4efb35c Fix micrometer configuration for multiBinder
- In MultiBinder configuration, MeterRegistery is loaded in the outterContext,
   hence removing the conditional on MeterRegistry bean check

 - Fix checkstyle issues
2020-08-18 17:59:52 -04:00
Aldo Sinanaj
5b3b92cdb9 GH-932: Added zstd compression type 2020-08-13 15:57:44 -04:00
Christian Tzolov
a6ac6e3221 Fix mime type all support for KafkaNullConverter 2020-08-06 14:21:23 -04:00
Oleg Zhurakousky
6280489be8 Ad RSocket snapshot repo 2020-08-06 19:26:28 +02:00
Navjot Cheema
80df80806b Producer compressionType documentation updated 2020-07-20 13:59:34 -04:00
buildmaster
ec52fbe2eb Going back to snapshots 2020-07-20 16:28:42 +00:00
buildmaster
5e128aafdc Update SNAPSHOT to 3.1.0-M2 v3.1.0-M2 2020-07-20 16:27:22 +00:00
Oleg Zhurakousky
f8d0b8bde2 Change SIK version to 3.3.0.RELEASE 2020-07-20 18:13:04 +02:00
Soby Chacko
4159217023 Kafka Streams metrics changes
* Kafka Streams metrics in the binder for Boot 2.2 users are streamlined to
  reflect the Micrometer native support added with version 1.4.0 which is
  available through Boot 2.3. While Boot 2.3 users will get this native support
  from  Micrometer, Boot 2.2 users will still rely on the custom implementation
  in the binder. This commit aligns that custom implemenation more with
  the native implementation.

* Disable the custom Kafka Streams metrics bean which is mentioned above
  (KafkaStreamsBinderMetrics) when the application is on Boot 2.3, as this
  implementation is only applicable for Boot 2.2.x.

* Update docs

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/880
2020-07-17 20:28:47 -04:00
Jay Bryant
087b09d193 Wording changes (#934)
* Wording changes

Replacing some terms

* Wording changes

One more change (missed a gerund form).
2020-07-14 11:34:54 -04:00
Gary Russell
83c42a55e9 GH-935: Fix KafkaNullConverter supported MimeType
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/935

Spring Cloud Function now checks if a converter supports the mime type before
calling it. Previously, the converter supported no mime types, so it was never
called, breaking Kafka Tombstone record processing (outbound).

The converter must support all mime types so it can perform a no-op conversion,
retaining the `KafkaNull`.

The abstract converter will return null whenever the payload is not a `KafkaNull`,
which is a signal to spring-cloud-function to try the next converter.
2020-07-13 17:24:22 -04:00
Gary Russell
1edc2c714a Upgrade parent pom to spring-kafka 2.5.3
- match the version used by Boot 2.4.0-SNAPSHOT
- also SIK 3.3.1.BUILD-SNAPSHOT
2020-07-13 14:21:13 -04:00
Soby Chacko
dc7c8d657a Fixing javadoc errors
Resovles https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/915
2020-06-16 18:37:30 -04:00
Soby Chacko
a549810899 Renaming Kafka Streams topology actuator endpoint
Kafka Streams topology actuator endpoint had a conflict with the JMX exporter
and was causing some IDE issues. Renming this endpoint to kafkastreamstopology.
Renaming the underlying methods in this actuator endpoint implentation.

Updating docs.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/895
2020-06-15 18:56:18 -04:00
Soby Chacko
aff8b8487c Add junit-vintage-engine dependency
With Boot 2.4, JUnit 4 tests need this dependency.

Fix tests.
2020-06-15 17:01:48 -04:00
Gary Russell
95bc54b991 GH-914: Add Micrometer Producer/Consumer Listeners
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/914

Boot no longer uses the deprecated JMX MBean scraping provided by Micrometer.

Add configuration to add Micrometer Meters when Micrometer and spring-kafka 2.5.x are on
the class path.

Micrometer for Streams

- work around until SK 2.5.3
2020-06-15 11:36:49 -04:00
Marcin Grzejszczak
38bea7e7da Added missing JAR packaging 2020-06-08 18:42:49 +02:00
Marcin Grzejszczak
201feca206 Migrated to new documentation generation 2020-06-08 18:41:25 +02:00
Soby Chacko
21a8f89f22 Update version to 3.1.0-SNAPSHOT 2020-06-02 13:58:54 -04:00
Soby Chacko
7fc9145a21 Fix a failing test due to application ID clash 2020-06-02 12:56:08 -04:00
Soby Chacko
473ca53723 Configuring Kafka producer timeout
Allow setting timeout for closing the producer.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/891
Resolves #909
2020-06-02 12:54:42 -04:00
Soby Chacko
788dc28d7e Simplify the handling of concurrency
In Kafka Streams binder, we use a complex strategy to handle
applications provided concurrency. Simplify this process while
making the binder stay aligned with boot -> binder -> binding
hierrachy for concurrency (num.stream.threads).

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/905
Resolves #907
2020-06-02 12:42:14 -04:00
Soby Chacko
dbc00ffa92 Docs changes for consumer batch.mode
See https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/892\#issuecomment-631862705
2020-06-02 12:38:44 -04:00
Soby Chacko
240ae8282e KafkaTopicProvisioner improvements
Use a retry template for topic description method call through
admin client when provisioning producer destinations. We are
retrying because in the event this operation gets failed, it
is retried with the default retry settings in the provisioner.

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/888
2020-06-02 12:38:29 -04:00
Soby Chacko
7adb10bcd2 Adding state store beans for KTable binding
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/897
2020-06-02 12:38:14 -04:00
Soby Chacko
8be9fe6abc Ignore test 2020-06-02 12:37:51 -04:00
Soby Chacko
04e0bf628c Kafka Streams binder test triage.
Fixing two tests in Kafka Streams binder that fail with the full suite.
See the comments on the code committed for more details.
2020-06-02 12:37:37 -04:00
Soby Chacko
79323588ba Ignore a test temporarily 2020-06-02 12:37:17 -04:00
Soby Chacko
395683fdaf Fixing random test failure on CI 2020-06-02 12:36:55 -04:00
Soby Chacko
2a25f7c1f3 Cleanup test 2020-06-02 12:36:13 -04:00
Soby Chacko
5fa88e11ec Fix checkstyle 2020-06-02 12:35:45 -04:00
Soby Chacko
ee3279072d Fixing a random test failure on CI 2020-06-02 12:35:20 -04:00