Class BowirePulsarProtocol
- Namespace
- Kuestenlogik.Bowire.Protocol.Pulsar
- Assembly
- Kuestenlogik.Bowire.Protocol.Pulsar.dll
Bowire protocol plugin for Apache Pulsar brokers. Built on the
Apache-maintained DotPulsar client.
public sealed class BowirePulsarProtocol : IBowireProtocol, IBowireProxySupport, IDisposable
- Inheritance
-
BowirePulsarProtocol
- Implements
- Inherited Members
Remarks
Discovery hits the HTTP admin API
(/admin/v2/persistent/<tenant>/<namespace>) to
enumerate topics. The broker URL itself (pulsar://) is what
the binary protocol connects to for produce/subscribe.
Produce is unary — one message in, one ack back. Subscribe is server-streaming and tails the topic from the latest message (the workbench is for inspection, not durable consumption; durable state would leak across browser sessions).
Constructors
BowirePulsarProtocol()
public BowirePulsarProtocol()
Properties
Description
One-line description shown next to the plugin's display name
in Settings → Plugins. Optional; defaults to empty so
the row falls back to "DisplayName + version" without the
description line. Keep it short (≤ 100 characters) — the row
truncates anything wider than the manage panel.
public string Description { get; }
Property Value
DescriptionKey
#691 — optional catalogue key for Description. When the workbench's active locale has an entry for it, that entry is shown; otherwise Description is, exactly as before. Third-party plugins leave it empty and keep today's behaviour.
public string DescriptionKey { get; }
Property Value
IconSvg
SVG icon for the protocol tab.
public string IconSvg { get; }
Property Value
Id
Short identifier (e.g., "grpc", "signalr").
public string Id { get; }
Property Value
Name
Protocol name shown in UI tabs.
public string Name { get; }
Property Value
ProxyNote
One sentence on what goes direct and why, for Partial and None.
public string? ProxyNote { get; }
Property Value
ProxyNoteKey
The catalogue key for ProxyNote (#691): the workbench shows the translation and falls back to the English note.
public string? ProxyNoteKey { get; }
Property Value
ProxySupport
How far this plugin's connections follow the proxy.
public BowireProxySupport ProxySupport { get; }
Property Value
Settings
Settings schema this plugin contributes to the Settings dialog. Each entry becomes a toggle/input in the plugin's section. Default implementation returns empty (no plugin-specific settings).
public IReadOnlyList<BowirePluginSetting> Settings { get; }
Property Value
Methods
DiscoverAsync(string, bool, CancellationToken)
Discover available services and methods.
public Task<List<BowireServiceInfo>> DiscoverAsync(string serverUrl, bool showInternalServices, CancellationToken ct = default)
Parameters
serverUrlstringshowInternalServicesboolctCancellationToken
Returns
Dispose()
Dispose the admin-API HttpClient. The binary Pulsar connection (DotPulsar) is opened per-call inside Invoke / InvokeStream and disposed there.
public void Dispose()
Initialize(IServiceProvider?)
Called after registration to inject the app's service provider (embedded mode).
public void Initialize(IServiceProvider? serviceProvider)
Parameters
serviceProviderIServiceProvider
InvokeAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)
Invoke a unary or client-streaming call.
public Task<InvokeResult> InvokeAsync(string serverUrl, string service, string method, List<string> jsonMessages, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)
Parameters
serverUrlstringservicestringmethodstringjsonMessagesList<string>showInternalServicesboolmetadataDictionary<string, string>ctCancellationToken
Returns
InvokeStreamAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)
Invoke a server-streaming or duplex call.
public IAsyncEnumerable<string> InvokeStreamAsync(string serverUrl, string service, string method, List<string> jsonMessages, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)
Parameters
serverUrlstringservicestringmethodstringjsonMessagesList<string>showInternalServicesboolmetadataDictionary<string, string>ctCancellationToken
Returns
OpenChannelAsync(string, string, string, bool, Dictionary<string, string>?, CancellationToken)
Open an interactive channel (for duplex/client-streaming).
public Task<IBowireChannel?> OpenChannelAsync(string serverUrl, string service, string method, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)
Parameters
serverUrlstringservicestringmethodstringshowInternalServicesboolmetadataDictionary<string, string>ctCancellationToken
Returns
ResolveMethodName(string, string)
FullName comes through as pulsar/topic/<full-name>/<op>.
Returns null for hand-typed method names that don't match this
shape so the invoke can surface a helpful error.
public string ResolveMethodName(string service, string method)