Closed amamory closed 12 months ago
The next example https://gnmic.openconfig.net/user_guide/subscriptions/#configure-multiple-subscriptions works fine. You see 3 Request msgs arriving at the server. But this case has multiple RPC requests, each one w its own mode.
I need a single RPC request with multiple paths and each path with different stream modes.
Hi Did you try to upgrade gnmic?
gnmic version upgrade
Upgrading worked 👍 Now the example in the doc is working. For instance, w this yml:
subscriptions:
sub1:
stream-subscriptions:
- paths:
- dummy:0
stream-mode: sample
sample-interval: 2s
- paths:
- dummy:1
stream-mode: sample
sample-interval: 1s
encoding: json
And this is the request message received by the server.
Subscribe request msg:
{
"subscribe": {
"subscription": [
{
"path": {
"elem": [
{
"name": "dummy:0"
}
]
},
"mode": 2,
"sample_interval": "2000000000"
},
{
"path": {
"elem": [
{
"name": "dummy:1"
}
]
},
"mode": 2,
"sample_interval": "1000000000"
}
]
}
}
This is the expected behavior. each path with its own stream config.
Thanks !
I am trying to reproduce this example in the documentation https://gnmic.openconfig.net/user_guide/subscriptions/#combining-multiple-stream-subscriptions-in-the-same-grpc-stream Where it combines multiple types of stream subscriptions in the same gRPC stream:
This is the config file:
I am expecting to see two paths w different stream modes in the same request. But the message is not sent from the client side. It generates this error
It seems that gnmic is not parsing the provided example. Maybe the documentation is out of date ? If that's the case, could you please provide a YML example that sends two paths w different stream modes ?
This is the gnmic version: