diff --git a/ees/amqp.go b/ees/amqp.go
index bdc872d94..ddcf14377 100644
--- a/ees/amqp.go
+++ b/ees/amqp.go
@@ -19,6 +19,7 @@ along with this program. If not, see
package ees
import (
+ "context"
"fmt"
"sync"
@@ -146,7 +147,8 @@ func (pstr *AMQPee) ExportEvent(content any, _ string) (err error) {
pstr.reqs.done()
return utils.ErrDisconnected
}
- err = pstr.postChan.Publish(
+ err = pstr.postChan.PublishWithContext(
+ context.TODO(),
pstr.exchange, // exchange
pstr.routingKey, // routing key
false, // mandatory
diff --git a/ers/amqp_it_test.go b/ers/amqp_it_test.go
index a71de22df..2cb21ce31 100644
--- a/ers/amqp_it_test.go
+++ b/ers/amqp_it_test.go
@@ -22,6 +22,7 @@ along with this program. If not, see
package ers
import (
+ "context"
"fmt"
"reflect"
"testing"
@@ -93,7 +94,8 @@ func TestAMQPER(t *testing.T) {
rdr.Serve()
randomCGRID := utils.UUIDSha1Prefix()
- if err = channel.Publish(
+ if err = channel.PublishWithContext(
+ context.TODO(),
"test-exchange", // publish to an exchange
"test-key", // routing to 0 or more queues
false, // mandatory