summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-10 11:36:14 +0300
committerValery Piashchynski <[email protected]>2021-07-10 11:36:14 +0300
commit3de13b2f0f0da6dbe577688388dbc4587aa12b21 (patch)
treefdb1e0d82361e68563a5d587aaba9f6ba1151cd9 /plugins
parenta90c34e163cd71980a63685d69a97cce3d72505d (diff)
DeliveryMode -> amqp.Persistent for all Publish operations
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/jobs/brokers/amqp/consumer.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/jobs/brokers/amqp/consumer.go b/plugins/jobs/brokers/amqp/consumer.go
index 7fcf4013..4a85ed01 100644
--- a/plugins/jobs/brokers/amqp/consumer.go
+++ b/plugins/jobs/brokers/amqp/consumer.go
@@ -197,10 +197,11 @@ func (j *JobsConsumer) Push(job *structs.Job) error {
// insert to the local, limited pipeline
err := j.publishChan.Publish(j.exchangeName, j.routingKey, false, false, amqp.Publishing{
- Headers: pack(job.Ident, msg),
- ContentType: contentType,
- Timestamp: time.Now(),
- Body: msg.Body(),
+ Headers: pack(job.Ident, msg),
+ ContentType: contentType,
+ Timestamp: time.Now(),
+ DeliveryMode: amqp.Persistent,
+ Body: msg.Body(),
})
if err != nil {
return errors.E(op, err)