nats-io / stan.go

NATS Streaming System
https://nats.io
Apache License 2.0
706 stars 117 forks source link

Encoded Connections in stan #325

Closed alifpay closed 4 years ago

alifpay commented 4 years ago

https://github.com/nats-io/nats.go#encoded-connections

Is it possible to use NewEncodedConn in stan.go ? c, _ := nats.NewEncodedConn(nc, nats.JSON_ENCODER)

derekcollison commented 4 years ago

No, STAN has its own encoding for the payload. You could encode the payload yourself before passing to STAN.