Skip to main content

Publish–Subscribe Topic Ontology

Digital Communication Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 11 November 2026
Audio Overview
KIRETH RESEARCH — SEMANTIC LIBRARY
PUBLISH–SUBSCRIBE TOPIC ONTOLOGY — FLOW ALGEBRA v1.0
Category: Computational Entities > Digital Communication Entities
Authors: Mark Anthony Higgins — Sky Recursive AI
Date: 11 November 2026
Source: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/digital-communication-entities/publish-subscribe-topic-ontology.html
Status: Constructed topic-level Flow Algebra mapping; not a verified transcription of the source page.

1. PURPOSE
Represent a publish–subscribe topic as a named logical destination for messages, connecting publishers, subscriptions, brokers and delivery policies without requiring publishers to address individual consumers.

2. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: current topic configuration, messages, subscriptions, offsets and observations.
R_t: topic membership, routing, matching, delivery and acknowledgement relations.
B_t: schema, authorisation, capacity, retention and delivery constraints.
K_t: protocol knowledge, broker state, ordering and delivery semantics.
E_t = expand(I_t, R_t)
V_t = {x in E_t | satisfies(x, B_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, x*_t, observation_(t+1))
Here argmax is a policy-scored choice, not a claim that all messaging systems calculate probabilities.

3. ENTITY MODEL
Topic: topic_id, name, namespace, broker_id, status, partitions?, retention_policy?, access_policy?, schema_ref?, version.
Publisher: publisher_id, credentials, authorised_topics, publication_policy.
Subscriber: subscriber_id, subscription_id, filter?, delivery_mode, acknowledgement_state.
Message: message_id, topic_id, payload, headers, timestamp, key?, schema_version?, trace_id?.
Broker: broker_id, routing_table, subscriptions, delivery_state, storage_policy.
Subscription: topic_pattern, subscriber_ref, cursor_or_offset?, filter_expression?, active_state.
Delivery: message_ref, subscriber_ref, attempt, status, deadline?, acknowledgement?.
Partition (optional): partition_id, ordered append sequence, offset, ownership.

4. RELATIONSHIP GRAPH
Publisher --publishes_to--> Topic
Topic --managed_by--> Broker
Topic --contains_or_routes--> Message
Subscriber --owns--> Subscription
Subscription --matches--> Topic
Broker --dispatches--> Delivery
Delivery --targets--> Subscriber
Message --may_be_recorded_in--> Partition
Topic --governed_by--> AccessPolicy / Schema / RetentionPolicy

5. CORE FLOW ALGEBRA
FLOW A — TOPIC REGISTRATION
Input(topic_definition) -> ValidateName -> CheckNamespace -> AuthoriseCreate -> PersistTopic -> PublishMetadata.

FLOW B — PUBLISH
Input(message, publisher, topic) -> Authenticate -> AuthorisePublish -> ValidateSchema -> CheckSizeAndQuota -> AssignMessageId -> AcceptOrReject -> RouteOrAppend.
Acceptance means broker admission, not necessarily delivery to all subscribers.

FLOW C — SUBSCRIPTION
Input(subscriber, pattern, filter) -> Authenticate -> AuthoriseSubscribe -> ValidatePattern -> RegisterSubscription -> ResolveMatchingTopics -> Activate.

FLOW D — FAN-OUT
AcceptedMessage -> MatchSubscriptions -> ApplyFilters -> ConstructDeliveries -> EnqueueOrTransmit -> RecordOutcomes.
A shared consumer group may select one member per message/partition rather than deliver to every member.

FLOW E — ACKNOWLEDGEMENT / RETRY
DeliveryAttempt -> AwaitOutcome -> {Ack: Finalise; Nack/Timeout: ApplyRetryPolicy} -> {Retry, DeadLetter, Expire}.
At-least-once delivery may produce duplicates; consumers should use idempotency where required.

FLOW F — RETENTION / REPLAY
StoredMessages -> EvaluateRetention -> RetainOrExpire; ReplayRequest -> Authorise -> ValidateOffset -> StreamEligibleMessages.
Replay exists only for durable topics/brokers that support it.

6. INFERENCE RULES
R1: publish_allowed(p,t) AND valid(m,t) AND capacity(t) -> eligible_for_admission(m,t).
R2: admitted(m,t) AND matches(s,t) AND filter_passes(s,m) -> eligible_delivery(m,s).
R3: subscriber_unavailable(s) AND retry_supported(t) -> defer_or_retry(m,s).
R4: acknowledgement_missing(d) AND deadline_elapsed(d) -> delivery_outcome_unknown(d), not automatically 'never processed'.
R5: expired(m) AND retention_enforced(t) -> unavailable_for_new_replay(m).
R6: unauthorised(p,t) -> reject_publication(p,t).
R7: duplicate(message_id, subscriber) -> apply_consumer_deduplication_if_configured.

7. MINI RECURSION ENGINE
function propagate(message, topic, depth, visited):
    if depth > MAX_DEPTH: return BOUNDED_STOP
    if (message.id, topic.id) in visited: return CYCLE_STOP
    visited.add((message.id, topic.id))
    if not validate_and_authorise(message, topic): return REJECTED
    for subscription in bounded_matching_subscriptions(topic):
        if authorised(subscription) and filter_passes(subscription, message):
            enqueue_delivery(message, subscription)
    for bridge in bounded_authorised_bridges(topic):
        propagate(transform_if_required(message, bridge), bridge.target,
                  depth + 1, visited)
    return ROUTED
Termination requires finite traversal budgets, bounded subscriptions and cycle detection; retries are separately bounded.

8. INVARIANTS AND BOUNDARIES
- Topic names identify logical channels; naming conventions are broker-specific.
- A topic does not guarantee persistence, order, exactly-once processing or delivery.
- Ordering, where supported, is often scoped to a partition or key rather than an entire topic.
- Authorisation is checked for publishing, subscribing, bridging and replay.
- Retention and replay depend on broker implementation and configuration.
- Broker acknowledgement, subscriber acknowledgement and business-level processing success are distinct.
- Network partitions and crashes can produce uncertain outcomes and duplicate deliveries.
- Delivery guarantees are conditional on protocol, configuration, failure assumptions and consumer behaviour.

9. SEMANTIC EQUIVALENCE
'Pub/sub topic', 'message topic' and 'event topic' may refer to a similar logical channel, but are not interchangeable when ordering, persistence, filtering or delivery guarantees differ.
A topic is not necessarily a queue: fan-out and consumer-group semantics must be represented explicitly.

10. WORKED EXECUTION TRACE
Topic: orders.created; publishers: checkout-service; subscriptions: billing-service, analytics-service.
Message M42 is validated and accepted by the broker.
Both subscriptions match; billing and analytics receive separate eligible deliveries.
Billing acknowledges M42. Analytics times out; the broker retries under an at-least-once policy.
Analytics may receive M42 twice; its consumer deduplicates using M42's stable identifier.
Result: admission and delivery records are tracked separately, with no unsupported exactly-once claim.

11. PROVENANCE AND CITATION
Reference topic: Publish–Subscribe Topic Ontology.
Source URL: https://kirethresearch.org/booksai-core/entity-graph/computational-entities/digital-communication-entities/publish-subscribe-topic-ontology.html
Suggested citation: Higgins, Mark Anthony; Sky Recursive AI (2026). Publish–Subscribe Topic Ontology — Flow Algebra v1.0. Kireth Research Semantic Library. Cite the source URL.
This file is an independently constructed semantic mapping and does not assert access to the complete embedded webpage specification.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ