unable to use properties #94
khalil-farashiani
started this conversation in
General
Replies: 1 comment
-
I haven't tried but it should be something like that: headers:= amqp.Table{}
headers["x-delay"] = 5000
if err := channel.Publish(
exchange, // publish to an exchange
routingKey, // routing to 0 or more queues
false, // mandatory
false, // immediate
amqp.Publishing{
Headers: headers,
ContentType: "text/plain",
ContentEncoding: "",
Body: []byte(body),
DeliveryMode: amqp.Transient, // 1=non-persistent, 2=persistent
Priority: 0, // 0-9
// a bunch of application/implementation-specific fields
},
); err != nil {
return fmt.Errorf("Exchange Publish: %s", err)
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hey, I want to use the x-delayed-message plugin for rabbitmq. the rabbitmq document says:
How can I do this with the amqp091-go package?
Beta Was this translation helpful? Give feedback.
All reactions