Open gusev-klara opened 7 months ago
Is there a way to send protobuf messages to RabbitMQ using this module?
Let's say I have a proto file that looks like this:
syntax = "proto3"; import "google/protobuf/timestamp.proto"; package performance.prototest; message Simple { google.protobuf.Timestamp synced_at = 1; }
and json data:
{ "synced_at": "2023-02-03T12:23:11Z" }
after encoding json into protobuf I'm getting javascript array: [10,6,8,175,249,243,158,6], but on xk6-amqp side it's transformed into [10 6 8 194 175 195 185 195 179 194 158 6] byte array.
[10,6,8,175,249,243,158,6]
[10 6 8 194 175 195 185 195 179 194 158 6]
One way I found is to use base64 encoding (with patching module to decode base64 before sending), but would be good to be able to send binary data.
Is there a way to send protobuf messages to RabbitMQ using this module?
Let's say I have a proto file that looks like this:
and json data:
after encoding json into protobuf I'm getting javascript array:
[10,6,8,175,249,243,158,6]
, but on xk6-amqp side it's transformed into[10 6 8 194 175 195 185 195 179 194 158 6]
byte array.One way I found is to use base64 encoding (with patching module to decode base64 before sending), but would be good to be able to send binary data.