pub(crate) async fn publish_nats_json(
nc: &Client,
reply: Subject,
frame: &str,
value: &Value,
) -> Result<()>Expand description
Publishes a JSON export control frame on a NATS reply subject.
§Arguments
nc- Connected NATS client.reply- Subject to publish to.frame- Frame name written to theAvena-Export-Frameheader.value- JSON body of the message.
§Errors
Returns an error if value cannot be serialized or the publish fails.