-
Notifications
You must be signed in to change notification settings - Fork 211
Description
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.