-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor messaging service config and migrate to messaging ser…
…vice package Signed-off-by: Benjamin Voiturier <benjamin.voiturier@iohk.io>
- Loading branch information
1 parent
f1132a7
commit e4c4260
Showing
10 changed files
with
63 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...core/src/main/scala/org/hyperledger/identus/shared/messaging/MessagingServiceConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.hyperledger.identus.shared.messaging | ||
|
||
import java.time.Duration | ||
|
||
case class MessagingServiceConfig( | ||
connectFlow: ConsumerJobConfig, | ||
issueFlow: ConsumerJobConfig, | ||
presentFlow: ConsumerJobConfig, | ||
didStateSync: ConsumerJobConfig, | ||
statusListSync: ConsumerJobConfig, | ||
kafkaEnabled: Boolean, | ||
kafka: Option[KafkaConfig] | ||
) | ||
|
||
final case class ConsumerJobConfig( | ||
consumerCount: Int, | ||
retryStrategy: Option[ConsumerRetryStrategy] | ||
) | ||
|
||
final case class ConsumerRetryStrategy( | ||
maxRetries: Int, | ||
initialDelay: Duration, | ||
maxDelay: Duration | ||
) | ||
|
||
final case class KafkaConfig( | ||
bootstrapServers: String, | ||
consumers: KafkaConsumersConfig | ||
) | ||
|
||
final case class KafkaConsumersConfig( | ||
autoCreateTopics: Boolean, | ||
maxPollRecords: Int, | ||
maxPollInterval: Duration, | ||
pollTimeout: Duration, | ||
rebalanceSafeCommits: Boolean | ||
) |