diff --git a/controller/eventService/Service.go b/controller/eventService/Service.go index c4d00cc9cf3ab4376c8906cb29e18d18227df018..cdf4aaad7ee16d97c06d2f9f6ddcca3c512247be 100644 --- a/controller/eventService/Service.go +++ b/controller/eventService/Service.go @@ -1,6 +1,7 @@ package eventservice import ( + "context" "encoding/json" "code.fbi.h-da.de/danet/gosdn/controller/config" @@ -61,7 +62,8 @@ func (e *EventService) PublishEvent(topic string, event event.Event) error { return &errors.ErrCouldNotMarshall{Identifier: topic + " " + event.EntityID.String(), Type: event.Type, Err: err} } - err = e.channel.Publish( + err = e.channel.PublishWithContext( + context.TODO(), "", // exchange q.Name, // routing key false, // mandatory