Define the configuration for NATS
Create a NATS configuration for bytes messages through ports supporting the Bytes type.
The binary contents will be passed as is through the ports. Currently the only known compiler supporting this is the Lamdera compiler, which requires the dependency "lamdera/codecs" to be added to your project.
Create a NATS configuration for string messages
The parentMsg typically transform a Nats.Msg into the host application top-level message.
type Msg =
NatsMsg (Nats.Msg Msg)
| ...
natsConfig =
Nats.Config.init NatsMsg {}Enable debug
Create a NATS configuration for bytes messages
The binary contents will be base64 encoded/decoded for passing through the ports