Skip to content

Commit

Permalink
remove subscribe timeout (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
lghinet authored Dec 22, 2021
1 parent 1e25ab1 commit 3bd9ca2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/messaging/nats/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ func (n *natsStreamingPubSub) Subscribe(topic string, handler messaging.Handler,

//run handler concurrently
go func() {
newCtx, cancel := context.WithTimeout(n.ctx, parsedOptions.AckWait)
defer cancel()
err = handler(newCtx, &msg)
//newCtx, cancel := context.WithTimeout(n.ctx, parsedOptions.AckWait)
//defer cancel()
err = handler(n.ctx, &msg)
if err == nil {
// we only send a successful ACK if there is no error
natsMsg.Ack()
Expand Down

0 comments on commit 3bd9ca2

Please sign in to comment.