Skip to content

Commit

Permalink
CORE-17386 - Create new topic for flow processor scheduled tasks. (#1271
Browse files Browse the repository at this point in the history
)

Create new topic for flow processor scheduled tasks.
  • Loading branch information
Dries Samyn authored Sep 29, 2023
1 parent 4c8fcdf commit c8bddf4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions data/topic-schema/src/main/java/net/corda/schema/Schemas.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,13 @@ private VirtualNode() {
public static final class ScheduledTask {
private ScheduledTask() {}

// TODO - duplicated to ease migration from first to second. First can be removed once integrated with runtime-os
public static final String SCHEDULED_TASK_DB_PROCESSOR = "scheduled.task.db.processor";
public static final String SCHEDULED_TASK_TOPIC_DB_PROCESSOR = "scheduled.task.db.processor";
public static final String SCHEDULED_TASK_NAME_DB_PROCESSOR = "deduplication-table-clean-up-task";
public static final String SCHEDULED_TASK_MAPPER_PROCESSOR = "scheduled.task.mapper.processor";
public static final String SCHEDULED_TASK_TOPIC_FLOW_PROCESSOR = "scheduled.task.flow.processor";
public static final String SCHEDULED_TASK_NAME_SESSION_TIMEOUT = "flow-session-timout";

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ topics:
- flowMapper
producers:
- db
ScheduledTaskFlowProcessorTopic:
name: scheduled.task.flow.processor
consumers:
- flow
producers:
- db
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class SchemaTests {
yamlFileData.forEach { (fileName: String, topics: Map<String, Map<String, *>>) ->
println("Testing: $fileName")
val potentialClass = fileName.substringBeforeLast(".")
val yamlTopicNames = topics["topics"]!!.toMap().map { it.value["name"] }
val yamlTopicNames = topics["topics"]!!.toMap().map { it.value["name"].toString() }
val kotlinTopicNames = memberMap[potentialClass]
assertThat(yamlTopicNames).containsExactlyInAnyOrderElementsOf(kotlinTopicNames)
assertThat(kotlinTopicNames).containsAll(yamlTopicNames)
}
}
}

0 comments on commit c8bddf4

Please sign in to comment.