mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-03-30 04:43:37 +00:00
* SubscriptionManager tracks shard and content topic interest * RecvService emits MessageReceivedEvent on subscribed content topics * Route MAPI through old Kernel API relay unique-handler infra to avoid code duplication * Encode current gen-zero network policy: on Core node boot, subscribe to all pubsub topics (all shards) * Add test_api_subscriptions.nim (basic relay/core testing only) * Removed any MAPI Edge sub/unsub/receive support code that was there (will add in next PR) * Hook MessageSeenEvent to Kernel API bus * Fix MAPI vs Kernel API unique relay handler support * RecvService delegating topic subs to SubscriptionManager * RecvService emits MessageReceivedEvent (fully filtered) * Rename old SubscriptionManager to LegacySubscriptionManager
35 lines
964 B
Nim
35 lines
964 B
Nim
import waku/[api/types, waku_core/message, waku_core/topics, common/broker/event_broker]
|
|
|
|
export types
|
|
|
|
EventBroker:
|
|
# Event emitted when a message is sent to the network
|
|
type MessageSentEvent* = object
|
|
requestId*: RequestId
|
|
messageHash*: string
|
|
|
|
EventBroker:
|
|
# Event emitted when a message send operation fails
|
|
type MessageErrorEvent* = object
|
|
requestId*: RequestId
|
|
messageHash*: string
|
|
error*: string
|
|
|
|
EventBroker:
|
|
# Confirmation that a message has been correctly delivered to some neighbouring nodes.
|
|
type MessagePropagatedEvent* = object
|
|
requestId*: RequestId
|
|
messageHash*: string
|
|
|
|
EventBroker:
|
|
# Event emitted when a message is received via Waku
|
|
type MessageReceivedEvent* = object
|
|
messageHash*: string
|
|
message*: WakuMessage
|
|
|
|
EventBroker:
|
|
# Internal event emitted when a message arrives from the network via any protocol
|
|
type MessageSeenEvent* = object
|
|
topic*: PubsubTopic
|
|
message*: WakuMessage
|