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

set partitions to 1 and rename sbt modules #27

Merged
merged 1 commit into from
Sep 23, 2020
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,11 @@ docker-compose up -d
sbt it:test
docker-compose down
```

Run example application:

```
docker-compose up -d
sbt sample/run
docker-compose down
```
10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ val dependencies = Seq(
"com.github.blemale" %% "scaffeine" % "4.0.1",
)

lazy val KaaSchemaRegistry = project
lazy val kaa = project
.configs(IntegrationTest)
.settings(
Defaults.itSettings,
Expand All @@ -88,15 +88,15 @@ lazy val KaaSchemaRegistry = project
libraryDependencies ++= dependencies,
)

lazy val SampleApp = project
lazy val sample = project
.settings(
name := "SampleApp",
name := "sample",
publish / skip := true,
)
.dependsOn(KaaSchemaRegistry)
.dependsOn(kaa)

lazy val root = (project in file("."))
.aggregate(KaaSchemaRegistry, SampleApp)
.aggregate(kaa, sample)
.settings(
publish / skip := true,
crossScalaVersions := Nil,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ class KaaSchemaRegistryAdmin(
private val adminClient = AdminClient.create(props)

def createTopic(): Unit = {
val newTopic = new NewTopic(topic, Optional.empty[java.lang.Integer](), Optional.empty[java.lang.Short]())
val NUMBER_OF_PARTITIONS = 1
val newTopic = new NewTopic(
topic,
Optional.of[java.lang.Integer](NUMBER_OF_PARTITIONS),
Optional.empty[java.lang.Short]()
)
val newTopicsConfigs = Map (
TopicConfig.CLEANUP_POLICY_CONFIG -> TopicConfig.CLEANUP_POLICY_COMPACT
)
Expand Down