Skip to content

Commit

Permalink
Fix earlier breakage
Browse files Browse the repository at this point in the history
This fixes what I broke earlier, and renames to use Inflight rather than
InFlight.   Also, note #8
  • Loading branch information
mjgarton committed Nov 16, 2018
1 parent f414ad4 commit e4e7f53
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions natsstreaming/nats_streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ func (c *AsyncMessageSource) ConsumeMessages(ctx context.Context, messages chan<
}
}

maxInFlight = c.conf.MaxInFlight
if maxInFlight == 0 {
maxInFlight = stan.DefaultMaxInflight
maxInflight := c.conf.MaxInFlight
if maxInflight == 0 {
maxInflight = stan.DefaultMaxInflight
}

sub, err := c.conn.QueueSubscribe(
Expand All @@ -174,7 +174,7 @@ func (c *AsyncMessageSource) ConsumeMessages(ctx context.Context, messages chan<
stan.DurableName(c.conf.QueueGroup),
stan.SetManualAckMode(),
stan.AckWait(60*time.Second),
stan.MaxInflight(stan.maxInflight),
stan.MaxInflight(maxInflight),
)
if err != nil {
return err
Expand Down

0 comments on commit e4e7f53

Please sign in to comment.