Holoscan SDK v4.2.0

Class InMemoryPubSubNetworkContext

Base Type

class InMemoryPubSubNetworkContext : public holoscan::PubSubContext

Holoscan PubSub NetworkContext backed by in-memory transports.

InMemoryPubSubNetworkContext wraps the GXF nvidia::gxf::InMemoryPubSubContext component, which self-configures with InMemoryDiscovery, InMemoryTransport, and InMemorySerializer backends. No IPC, network sockets, or shared-memory segments are required — messages are delivered by transferring GXF entity UIDs within the same process.

Public Functions

HOLOSCAN_NETWORK_CONTEXT_FORWARD_ARGS_SUPER (InMemoryPubSubNetworkContext, PubSubContext) InMemoryPubSubNetworkContext()=default
~InMemoryPubSubNetworkContext() override
inline virtual const char *gxf_typename() const override

Points at nvidia::gxf::InMemoryPubSubContext so that the GXF component self-configures its own backends (InMemoryDiscovery, InMemoryTransport, InMemorySerializer) via its initialize() method. The Holoscan layer then forwards all registered parameters (including drop_pattern, serializer_mode, reorder_pattern) directly to the GXF component by name.

virtual void setup(ComponentSpec &spec) override

Define the network context specification.

Parameters

spec – The reference to the component specification.

virtual void initialize() override

Initialize the network context.

This function is called after the network context is created by holoscan::Fragment::make_network_context().

Protected Functions

virtual void setup_backend() override

Called after the GXF InMemoryPubSubContext has been created and its parameters have been set. In private mode: calls GXF initialize() + init_context(). In session mode: creates shared frontends + serializer chain, calls init_context().

Previous Class WorkQueue
Next Class InMemoryPubSubSession
© Copyright 2022-2026, NVIDIA. Last updated on May 11, 2026