Portal Community

Two Subscriber Roles

Interaction Receiver

The targeted user's browser. Subscribes to interactions.{userId}. Receives InteractionRequest messages. Renders UI components. Publishes InteractionResponse.

Implemented by: InteractionSubscriber (client package), useInteractionReceiver() (React)

Callback Subscriber

The server code that sent the request. Subscribes to interactions.callback.{interactionId}. Receives InteractionResponse or InteractionTimeout. Resumes the workflow.

Implemented by: InteractionPipeline (server package), internal to PublishAndWaitAsync()

Subscription Topics

TopicSubscriberMessages Received
interactions.{userId}User's browser session(s)InteractionRequest
interactions.callback.{interactionId}Server (the pipeline)InteractionResponse, InteractionTimeout
interactions.ack.{interactionId}User's browser sessionInteractionAck
interactions.dismiss.{userId}User's browser session(s)Dismissal signals (timeout, first-to-respond)

Subscription Lifecycle

1

Client Connects

User logs in. InteractionProvider mounts. InteractionSubscriber subscribes to interactions.{userId} and interactions.dismiss.{userId} via EdgeStream.

2

Pending Interactions Delivered

Any pending interactions (published while the user was offline) are delivered immediately on connection. The client renders them in the interaction queue.

3

Live Interactions Arrive

New interactions arrive in real-time via the EdgeStream subscription. They are added to the queue as they arrive.

4

User Responds

For each interaction, the user acts. InteractionResponsePublisher publishes to the callback topic. The ack topic subscription is created transiently for this interaction.

5

Client Disconnects

On disconnect or unmount, InteractionProvider unsubscribes from all interaction topics. In-flight interactions are preserved server-side and re-delivered on reconnect.

InteractionProvider Handles All Subscriptions You do not need to manage EdgeStream subscriptions directly for EdgeInteract. The InteractionProvider sets up and tears down all required subscriptions automatically. Use the React hooks to access the data.