902 Commits

Author SHA1 Message Date
Gary Russell
4480301a63 Upgrade to 2.4 clients
- Remove references to ZkClient
- deprecation of `Consumer.committed(TopicPartition tp)`
- Addition of `onPartitionsLost` to `ConsumerRebalanceListener`
- since `onPartitionsLost` calls `onPartitionsRevoked` by default with a
  possible partial list, remove the revoked partitions from the assignments
- fix some reflection uses in tests (`groupId` field and `NewTopic`)
- fix `EKIT` `listen12` listener - we now always get the full batch
- `ConsumerRebalanceListener.onPartitionsRevoked` is no longer called with an
  empty collection
- deprecation of some `TopologyDriver` helper classes
- update what's new and change log appendix
- add `unregisterSeekCallback` to `ConsumerSeekAware`
  - `AbstractCSA` now removes TL there since we may have only a partial revoke

* Fix what's new

* GH-1277: isAckAfterHandle default true

Resolves: https://github.com/spring-projects/spring-kafka/issues/1277

* Fix SBFB Javadocs

* Update version

* Fix test for isAckAfterHandle default true

* Upgrade to 2.4.0 Clients

* Remove mavenLocal() repo
2019-12-17 11:58:17 -05:00
Dharmesh Jogadia
a34f48d554 Remove StreamsConfig dependency
Remove StreamsConfig dependency from StreamsBuilderFactoryBean
2019-12-17 10:00:21 -05:00
Jean d'Arc
90e90525bc Add default header patterns to SimpleKHMapper
Fix indentation with tabs only
2019-12-17 10:00:21 -05:00
Gary Russell
8c8e56be48 Warn for non-String consumer property overrides 2019-12-13 15:44:42 -05:00
Gary Russell
10127ec7aa Javadoc Polishing
- only String-valued properties are used when overriding consumer properties
  via the container properties.
2019-12-13 14:27:45 -05:00
Gary Russell
09e775f098 GH-1331: KMLC - treat auth. exceptions as fatal
Resolves https://github.com/spring-projects/spring-kafka/issues/1331

Authorization errors create a log storm; stop the container for
such exceptions in the same way we do for `NoOffsetForPartitionException`.

**cherry-pick to 2.2.x**
2019-12-13 10:54:06 -05:00
Gary Russell
ceb8a99dc9 More docs for missingTopicsFatal: false by default 2019-12-11 09:29:10 -05:00
Gary Russell
e12c2856f4 Fix docs for missingTopicsFatal: false by default 2019-12-11 09:19:44 -05:00
Gary Russell
45902a5770 KTU.producerProps doc polishing 2019-12-10 11:01:18 -05:00
donald-dh
39bf605bb3 Fix wrong method name
This is code block for explaining methods to set up producer and consumer properties. So 'consumerProps()' and 'producerProps()' are must be here. But there is 'senderProps()' method instead of 'producerProps().

API ref. `org.springframework.kafka.test.utils.KafkaTestUtils#producerProps`
2019-12-10 10:50:20 -05:00
Gary Russell
e326722c55 Deprecate KTU.senderProps() 2019-12-10 10:38:21 -05:00
Asi Bross
16a12fe33f Fix KafkaListenerEndpointRegistry.stop(Runnable)
The `KafkaListenerEndpointRegistry.stop(Runnable)` doesn't change its `running` state

* Removed the callback wrap in favor of setting the state to stop in two places
* Set the running state to false before actually calling stop on the containers
2019-12-09 14:13:53 -05:00
Gary Russell
9bfc8803ea SendTo Doc Polishing
- explicitly mention the needed reply template.
2019-12-06 14:46:05 -05:00
Gary Russell
fde3b20a04 Fix Sonar issues 2019-12-05 12:10:39 -05:00
Gary Russell
459b34cfaf Fix exception message in HeaderEnricher 2019-12-04 14:44:01 -05:00
Spring Buildmaster
d8e367799e [artifactory-release] Next development version 2019-12-04 16:53:40 +00:00
Spring Buildmaster
8dde7cbfba [artifactory-release] Release version 2.3.4.RELEASE 2019-12-04 16:53:37 +00:00
Gary Russell
67b7019fcf Upgrade Spring Data Commons 2019-12-04 10:51:56 -05:00
Gary Russell
69e04475c7 Upgrade Spring, Micrometer versions 2019-12-03 15:22:06 -05:00
Gary Russell
9992a6ecb2 GH-1321: Add intercept before Tx option
Resolves https://github.com/spring-projects/spring-kafka/issues/1321

Provide an option to invoke `RecordInterceptor` before the transaction starts.

* Fix doc typo.
2019-12-03 15:18:38 -05:00
Gary Russell
42f26806ab GH-1323: Fix missing javadoc 2019-12-03 12:29:22 -05:00
Gary Russell
e03de25ec4 GH-1323: s-k-test remove hard AssertJ dependency
Resolves https://github.com/spring-projects/spring-kafka/issues/1323

* Polish javadocs.
2019-12-03 11:53:49 -05:00
Gary Russell
0a95ec9b6e GH-1323: Fix import
Resolves https://github.com/spring-projects/spring-kafka/issues/1323

`EmbeddedKafkaCondition` imported `Arrays` from AssertJ instead of `java.util`.
2019-12-03 09:37:39 -05:00
Gary Russell
e5b9cf56ba Quick Start Doc Polishing (version) 2019-12-03 08:59:37 -05:00
Gary Russell
cda70d4730 Add gradle to test version override appendix
- also capture the current version
2019-11-22 12:23:01 -05:00
Gary Russell
ad7b856f87 Restore addGitMetadata; only publish failures 2019-11-15 15:34:11 -05:00
Gary Russell
38d326f320 Upgrade to Gradle 6.0 2019-11-15 14:14:57 -05:00
Gary Russell
29403eb230 missingTopicsFatal false by default
* Fix tests

* Fix race in KMLCT.testPauseResumeAndConsumerSeekAware().
2019-11-14 13:45:37 -05:00
Gary Russell
c91d491d10 GH-1309: Fix NPE when no syncCommitTimeout set
Resolves https://github.com/spring-projects/spring-kafka/issues/1309

When no commit timeout is provided we update the properties in the local
container properties.

The parent container's properties must also be updated because the parent
is passed into the error handler (e.g. for stopping the entire container
when an error occurs).

Also, fix a problem where the child container instead of the parent was
passed into the batch error handler.
2019-11-13 12:23:47 -05:00
Gary Russell
e4e59f9324 Revert "Remove verbose mock logging"
This reverts commit ae79b698bc.
2019-11-12 17:38:52 -05:00
Gary Russell
ace9d8b35f Add ContainerCustomizer
* Add since to new setter.
2019-11-12 16:14:09 -05:00
Gary Russell
ae79b698bc Remove verbose mock logging 2019-11-11 17:20:46 -05:00
Gary Russell
426b1ae148 Fix checkstyle for previous commit
`logger` is no linger static so needs this.
2019-11-11 16:02:55 -05:00
Gary Russell
76b5c99682 Fix logger name in FailedRecordProcessor 2019-11-11 13:46:18 -05:00
Gary Russell
98a6354d6f Upgrade AssertJ, Hamcrest 2019-11-08 16:17:31 -05:00
Gary Russell
534780d7a4 ConsumerSeekAware Improvement
Add seek to beginning/end variants that take a collection to make
resetting all assigned partitions easier, and more efficient.
2019-11-08 14:32:39 -05:00
Gary Russell
eccfb4c850 Don't delay batch offset commits
When `idleBetweenPolls` was set, the sleep was done after invoking
the listener and before calling `pollAndInvoke()` again.

This delays committing the offsets for ack modes other than `RECORD`.

Move the sleep to after committing the offsets and before the next `poll()`.
2019-11-08 11:01:18 -05:00
Gary Russell
1cd3ebfa3a Fix Sonar issues 2019-11-08 09:28:35 -05:00
Gary Russell
b5dfbe9e4c GH-1299: Add AssertJ keyValue Condition
Resolves https://github.com/spring-projects/spring-kafka/issues/1299

**cherry pick to 2.2.x**

* Fix NPE when expected value is null

* Fix since; add `allOf` test

* Add new condition to docs
2019-11-07 16:45:02 -05:00
Gary Russell
2643f5f22e GH-1293: Fix KafkaTestUtils.getSingleRecord()
Resolves: https://github.com/spring-projects/spring-kafka/issues/1293

`getSingleRecord()` would fail prematurely if records were present in other topics

- Add a loop to prevent early exit
- Always reset the offsets for other topics before assertions
2019-11-07 13:58:37 -05:00
Gary Russell
2376699772 GH-1291: Fix ApplicationEvent documentation
Resolves https://github.com/spring-projects/spring-kafka/issues/1291

- documented in multiple places with inconsistency
2019-11-07 13:19:51 -05:00
Artem Bilan
ab5f57b063 GH-1301: Make DefKafkaHMapper backward compatible
Fixes https://github.com/spring-projects/spring-kafka/issues/1301

* Restore `DefaultKafkaHeaderMapper.DEFAULT_TO_STRING_CLASSES` set
of `MimeType` and `MediaType`
* Use this set as default one for the `toStringClasses` property
* Therefore `MimeType` headers are now stored in the `ProducerRecord`
as string.
* Also encode all the `toStringClasses` values as JSON - for backward
compatibility as well
This makes it backward compatible with previous versions and doesn't
break the current version since it is easy to recreate a `MimeType`
from its string representation - Postel's law
2019-11-07 13:07:05 -05:00
Spring Buildmaster
6ca5b97f79 [artifactory-release] Next development version 2019-11-05 17:15:21 +00:00
Spring Buildmaster
25c209203d [artifactory-release] Release version 2.3.3.RELEASE 2019-11-05 17:15:17 +00:00
Gary Russell
fad8c58686 GH-1294: Fix mapping empty String header values
Fixes https://github.com/spring-projects/spring-kafka/issues/1294
2019-11-04 18:23:06 -05:00
Spring Buildmaster
0e039f1302 [artifactory-release] Next development version 2019-11-04 15:59:05 +00:00
Spring Buildmaster
379fee2415 [artifactory-release] Release version 2.3.2.RELEASE 2019-11-04 15:59:02 +00:00
Gary Russell
9cd361a4c2 Upgrade Reactor BOM 2019-11-04 10:23:34 -05:00
Gary Russell
665685de3e Upgrade Spring dependencies 2019-11-04 10:16:41 -05:00
Gary Russell
4c2f920dbb Upgrade to gradle 5.6.4 2019-11-01 21:20:42 -04:00