holoscan::InMemoryPubSubSession
holoscan::InMemoryPubSubSession
holoscan::InMemoryPubSubSession
Process-global shared state for a group of in-memory pub/sub participants.
InMemoryPubSubSession consolidates the SharedInMemoryPubSubBackend and SharedInMemoryPubSubSession into a single, reusable class. It owns a shared InMemoryDiscovery and InMemoryTransport, and provides per-participant discovery/transport frontends that multiplex callbacks so that each PubSubContext’s init_context() wiring is independent. This was implemented to enable test cases that involve launching multiple GXF contexts from the same process.
Inherits from: std::enable_shared_from_this< InMemoryPubSubSession > (public)
Join this session from a specific GXF context.
Leave this session from a specific GXF context.
Returns true if more than one distinct GXF context has joined.
Get or create a session by ID.
Thread-safe. Returns the same shared_ptr for the same session_id within the process.
Release all sessions and reset shared state for tests.
Must only be called when no session frontends are active.
Create a paired discovery + transport frontend that share the same participant state.
The discovery and transport frontends must be used together for a single PubSubContext — they share per-participant callback state so that PubSubContext::init_context() wiring is independent per context.