Table of Contents

Class StateChangeEvents

Namespace
Virtufin.Api.Services
Assembly
Virtufin.Api.dll

CloudEvent attributes for the Tier 0 state.change topic.

public static class StateChangeEvents
Inheritance
StateChangeEvents
Inherited Members

Remarks

ce-source is the publishing service's URN, urn:com.virtufin:<service>. That form is the same at every tier.

The ce-type rule below is Tier 0 only: com.virtufin.<service>.<action>, with no category segment, because a Tier 0 topic already is <service>.<category> and repeating it here duplicated routing the subscriber already has.

Do not generalise that to Tier 1. A Tier 1 type is domain-based and carries no service segment at all (com.virtufin.trading.order.filled), and a Tier 1 topic is scenario- or world-prefixed (sc.<scenarioId>.trading.…) rather than <service>.<category> — so neither half of the reasoning above applies. See the pubsub-topics spec for the per-tier patterns.

These were com.dapr.event.sent and urn:apigateway: the same type for saves and deletes, so it discriminated nothing and every subscriber had to parse the payload to learn which had happened.

Fields

Source

The API is the publishing service for these events.

public const string Source = "urn:com.virtufin:api"

Field Value

string

TypeDeleted

public const string TypeDeleted = "com.virtufin.api.state-deleted"

Field Value

string

TypeSaved

public const string TypeSaved = "com.virtufin.api.state-saved"

Field Value

string

Methods

TypeForAction(string)

Maps a StateActionConstants action to its ce-type.

public static string TypeForAction(string action)

Parameters

action string

Returns

string