Skip to content

🐛 Bug Report: gNMI SubscribeRequest returns only a single response, unlike gnmic #211

@ChVSusanth353

Description

@ChVSusanth353

When using the Go gNMI client with the following SubscribeRequest (in ONCE mode), I receive only a single notification for the given sensor path.

However, when subscribing to the same sensor path using the gnmic CLI tool, I get multiple duplicate bundles (i.e., multiple notifications). This suggests the target is sending multiple updates, but my Go client receives only one.

Go client snippet used:

req := &gnmipb.SubscribeRequest{
Request: &gnmipb.SubscribeRequest_Subscribe{
Subscribe: &gnmipb.SubscriptionList{
Mode: gnmipb.SubscriptionList_ONCE,
Subscription: []*gnmipb.Subscription{
{Path: gnmiPath},
},
Encoding: gnmipb.Encoding_PROTO, // changed from JSON_IETF to PROTO
},
},
}

Expected behavior

The client should receive all notifications sent by the target in response to the ONCE subscription, including duplicates.
Behavior should match gnmic subscribe --mode once ... CLI output.
Actual behavior

Only one notification is received in the Go client.
The stream closes or ends after the first notification, no further updates captured.

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