Skip to content

Is it possible to pass the byte[] of the proto object to the Response Observer onNext call instead of the deserialized object? #9707

@JonSobocinski

Description

@JonSobocinski

Basically, I have a grpc service that on a request goes and pulls some proto objects from a database instance, and sends them to a client.
In the database, the objects are actually just stored as a byte[], which comes from the proto objects .toByteArray() call.

Right now I pull the bytes from the database, deserialize them and then send them to the response observer via onNext(). I know the onNext call just serializes them again to send them off.

I was wondering it's possible for me to avoid this duplicate effort of serializing/deserializing and just give the byte[] directly to the response observer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions