Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#1130) Add --jetstream flag to publish #1144

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

ploubser
Copy link
Collaborator

@ploubser ploubser commented Sep 6, 2024

Here we add the --jetstream flag to the publish action. This will publish messages via jetstream and process the ack message.

}

if opts().Trace {
trace, err := json.Marshal(msg)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be the ack.Data I think

@@ -229,6 +232,58 @@ func (c *pubCmd) doReq(nc *nats.Conn, progress *uiprogress.Bar) error {
return nil
}

func (c *pubCmd) doJetstream(nc *nats.Conn, progress *uiprogress.Bar) error {
js, err := nc.JetStream()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed


msg.Subject = c.subject

ack, err := js.PublishMsg(msg)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, errr:=nc.Request(msg, opts().Timeout) then parse the ack with jsm.ParsePubAck and trace the ack

@ploubser ploubser force-pushed the issue_1130 branch 2 times, most recently from 5d88557 to 2652378 Compare September 9, 2024 12:33
Here we add the --jetstream flag to the publish action. This will
publish messages via jetstream and process the ack message.
@ripienaar ripienaar merged commit 3ad589d into nats-io:main Sep 9, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants