Related to Google Protocol Buffers, borrows its name from the .proto file extension containing a protocol schema.
Questions tagged [proto]
564 questions
4
votes
1 answer
Represent a protobuf map as a json
I'm using grpcc, which is based on protobuf.js, to test my grpc service APIs.
My .proto file:
message MyRequest {
string userId = 1;
map params = 2;
}
I tried the following json body to send a request:
{userId : "my_user_id"…

Maddy
- 2,114
- 7
- 30
- 50
4
votes
1 answer
what is the meaning of "Value" class in .proto file
can someone please explain me the meaning of "Value" in below .proto file?
message Test {
string id = 1;
string name = 2;
google.protobuf.Value property = 6;}

Ashlin Karkada
- 1,320
- 1
- 12
- 20
4
votes
1 answer
Java, gRPC and Context propagation
Does anyone have a working example of io.grpc.Context propagation between client (stub) and server using gRPC in java?
My understanding is that it's not possible and I must use Metadata instead. Am I correct?
Online I have found only examples using…

db80
- 4,157
- 1
- 38
- 38
4
votes
2 answers
Protobuf - java package name and sharing proto file across projects
I have two java projects that produce and consume messages from Kafka,
one project produces a message of type Ticker and another project consumes this message.
So I've created this file
syntax = "proto3";
message Ticker {
string symbol = 1;
…

areller
- 4,800
- 9
- 29
- 57
4
votes
1 answer
Error while importing another proto file
I get an error when I try to compile a proto file to convert to .java.
Could you point out what I'm missing ?
protoc --proto_path=src\main\resources\proto --java_out=src\main\java…

Sharat Chandra
- 4,434
- 7
- 49
- 66
4
votes
1 answer
Is there a way to implement map>> in protobuf 3?
I tried this but have scope issues.
message DataCollectionMessage {
message subData
{
message SubDataList {
repeated string data = 1;
}
map parameters = 1;
}
…

Deepak Garg
- 47
- 1
- 6
4
votes
1 answer
How to include .proto files having mutual dependency
I have two .proto files, which has two packages that have mutual dependency.
a.proto
syntax = "proto3";
import "b.proto";
package a;
message cert {
string filename = 1;
uint32 length = 2;
}
enum state {
UP = 1;
DOWN =…

Manu Thomas Mathew
- 101
- 1
- 6
4
votes
1 answer
Key in map fields cannot be float/double, bytes or message types
We are planning to move our existing services to move grpc service. so need to convert the services to proto Defined Message Type. In the reponse, we have map with customize object as key.
eg response:
//java
Map

Paraneetharan Saravanaperumal
- 4,699
- 2
- 18
- 29
4
votes
1 answer
How to define value and id for enum in protobuf? (proto java client)
I am new to protobuf usage.
i am planning to write protobuf def with enum(s) in it.
is there any way to provide id, value and as well description in it.
after compilation i want generated enum should be equivalent as below example
enum Sample{
…

Suresh Lakku
- 95
- 1
- 9
4
votes
1 answer
Method Dispatch with UseMethod within an environment
I want to be able to dispatch to methods defined within an environment. This would allow me to define polymorphic methods for proto objects (proto objects in turn inherit from the environment class). E.g.:
x <- proto()
x$foo <-…

mchen
- 9,808
- 17
- 72
- 125
3
votes
0 answers
java.io.IOException: Cannot run program "protoc": CreateProcess error=2
i'm trying to develop an app on flutter. My code in the app\ .gradle is:
apply plugin: 'com.google.protobuf'
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
…

user14845003
- 101
- 10
3
votes
0 answers
RpcError from application code while cypress testing
I have a vuejs application which uses grpc-web and proto.
I am integrating cypress in my application for automation testing.
I am having an issue when running the cypress test the API call returning error, but when I am running the application…

Priyank
- 224
- 2
- 14
3
votes
1 answer
gRPC slow serialization on large dataset
I know that google states that protobufs don't support large messages (i.e. greater than 1 MB), but I'm trying to stream a dataset using gRPC that's tens of megabytes, and it seems like some people say it's ok, or at least with some…

joshp
- 706
- 5
- 22
3
votes
2 answers
Getting "protoc": executable file not found in $PATH when running "go generate" command
We have an application written in GoLang and we are using GRPC for defining service contracts.
When we try to run "go generate" command to generate stub from proto file it gives following error:
main.go:4: running "protoc": exec: "protoc":…

Hardik Jethava
- 43
- 1
- 6
3
votes
1 answer
Getting AttributeError: module 'proto' has no attribute 'module'
I'm trying to deploy a gRPC server to Cloud Run using Docker to create associated image. I am getting the following error when called:
[] Traceback (most recent call last):
> [] File "server.py", line 5, in
> [] from…

user3385136
- 513
- 1
- 7
- 20