From 3f8a21851609f560dab949973f963c83969018da Mon Sep 17 00:00:00 2001 From: Dries Samyn Date: Mon, 2 Oct 2023 13:28:20 +0100 Subject: [PATCH] Topic and Avro schema for flow timeout events. --- .../avro/net/corda/data/flow/FlowTimeout.avsc | 20 +++++++++++++++++++ .../main/java/net/corda/schema/Schemas.java | 1 + .../main/resources/net/corda/schema/Flow.yaml | 7 +++++++ 3 files changed, 28 insertions(+) create mode 100644 data/avro-schema/src/main/resources/avro/net/corda/data/flow/FlowTimeout.avsc diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/flow/FlowTimeout.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/flow/FlowTimeout.avsc new file mode 100644 index 0000000000..e11c023042 --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/flow/FlowTimeout.avsc @@ -0,0 +1,20 @@ +{ + "type": "record", + "name": "FlowTimeout", + "namespace": "net.corda.data.flow", + "doc": "Represents of a flow timeout instruction.", + "fields": [ + { + "name": "checkpointStateKey", + "type": "string", + "doc": "Key for the state record that is storing the checkpoint." + }, + { + "name": "timeoutDateTime", + "type": { + "type": "long", + "logicalType": "timestamp-millis" + } + } + ] +} diff --git a/data/topic-schema/src/main/java/net/corda/schema/Schemas.java b/data/topic-schema/src/main/java/net/corda/schema/Schemas.java index bf3608479d..6c80b8beab 100644 --- a/data/topic-schema/src/main/java/net/corda/schema/Schemas.java +++ b/data/topic-schema/src/main/java/net/corda/schema/Schemas.java @@ -104,6 +104,7 @@ private Flow() { public static final String FLOW_MAPPER_EVENT_STATE_TOPIC = getStateAndEventStateTopic(FLOW_MAPPER_EVENT_TOPIC); public static final String FLOW_MAPPER_EVENT_DLQ_TOPIC = getDLQTopic(FLOW_MAPPER_EVENT_TOPIC); public static final String FLOW_MAPPER_CLEANUP_TOPIC = "flow.mapper.cleanup"; + public static final String FLOW_TIMEOUT_TOPIC = "flow.timeout"; } /** diff --git a/data/topic-schema/src/main/resources/net/corda/schema/Flow.yaml b/data/topic-schema/src/main/resources/net/corda/schema/Flow.yaml index 0b29c6fce0..7c8a52f016 100644 --- a/data/topic-schema/src/main/resources/net/corda/schema/Flow.yaml +++ b/data/topic-schema/src/main/resources/net/corda/schema/Flow.yaml @@ -87,3 +87,10 @@ topics: producers: - flowMapper config: + FlowTimeoutTopic: + name: flow.timeout + consumers: + - flow + producers: + - flow + config: