Skip to content

PubSub Adapter: promote SubscriptionManager/MessageContext to ISession and drop ManagedSession casts #3925

Description

@marcschier

Tracks migrating the PubSub external-server adapter (Opc.Ua.PubSub.Adapter) to use the ISession abstraction instead of the concrete Opc.Ua.Client.ManagedSession wherever possible, and removing the remaining downcasts.

Per PR #3892 review feedback, ServerSession (and related adapter session usage) was changed to hold and pass ISession. Service calls (ReadAsync/WriteAsync/CallAsync/TranslateBrowsePathsToNodeIdsAsync/DisposeAsync) already work through ISession.

The following members are currently not on ISession and still require a downcast to ManagedSession (places to address by promoting the API onto ISession/ISessionClient):

  • ManagedSession.SubscriptionManager (Subscriptions.ISubscriptionManager) — used by ServerSession.CreateDataChangeSubscriptionAsync and ServerSession.StartModelChangeMonitoringAsync.
  • ManagedSession.MessageContext (IServiceMessageContext) — used by ServerSession.ResolveBrowsePathAsync (session.MessageContext.NamespaceUris).

Proposed resolution: expose SubscriptionManager and MessageContext (or equivalents) on ISession, then drop the (ManagedSession) casts in ServerSession.

Raised from PR #3892 review feedback.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions