Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes an improper error message during topic validation initialisation. #83

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.28.2] - 2024-01-25

### Fixed

- Error message "Topics for default shard have to be specified on 'tw-tkms.topics' property." given, when default shard was not defining any topics.

## [0.28.1] - 2024-01-12

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.28.1
version=0.28.2
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void preValidateAll() {
var shardProperties = tkmsProperties.getShards().get(shard);
List<String> shardTopics = shardProperties == null ? null : shardProperties.getTopics();

if (shardTopics != null && shard == tkmsProperties.getDefaultShard()) {
if (shardTopics != null && !shardTopics.isEmpty() && shard == tkmsProperties.getDefaultShard()) {
jordanhasgul marked this conversation as resolved.
Show resolved Hide resolved
throw new IllegalStateException("Topics for default shard have to be specified on 'tw-tkms.topics' property.");
}

Expand Down
3 changes: 3 additions & 0 deletions tw-tkms-starter/src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ tw-tkms:
kafka:
bootstrap.servers: "${TW_TKMS_KAFKA_1_TCP_HOST:localhost}:${TW_TKMS_KAFKA_1_TCP_9092}"
shards:
# Covers a bug with topics validation
0:
polling-interval: 6ms
1:
polling-interval: 6ms
kafka:
Expand Down
Loading