Skip to content

Wildcard subs nats #1042

@pancakeswya

Description

@pancakeswya

Using nats transport there is no way to find out the reply subject on wildcard subscription. For example if we use prefix "updates.*" for wrpc::transport::nats::Client, and then generating bindings using wit_bindgen_wrpc::generate, there is no context about reply subject in handler, only thing we have is nats headers. As workaround maybe instead of nats headers in server handler use struct NatsContext { headers: Option<async_nats::HeaderMap>, prefix: String, ... } with extracted prefix from nats subscription reply subject

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions