Skip to content

Commit

Permalink
Fix typo and small configuration bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillem committed Feb 14, 2024
1 parent a79516a commit f787b80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

jobs:
test-pulsar:
test-rabbitmq:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
12 changes: 6 additions & 6 deletions destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ func (d *Destination) Configure(ctx context.Context, cfg map[string]string) (err
return fmt.Errorf("invalid config: %w", err)
}

d.exchange = d.config.ExchangeName
d.routingKey = d.config.RoutingKey
if d.exchange == "" {
d.routingKey = d.config.QueueName
}

if shouldParseTLSConfig(ctx, d.config.Config) {
d.tlsConfig, err = parseTLSConfig(ctx, d.config.Config)
if err != nil {
Expand All @@ -60,12 +66,6 @@ func (d *Destination) Configure(ctx context.Context, cfg map[string]string) (err
return nil
}

d.exchange = d.config.ExchangeName
d.routingKey = d.config.RoutingKey
if d.exchange == "" {
d.routingKey = d.config.QueueName
}

sdk.Logger(ctx).Debug().Msg("destination configured")
return nil
}
Expand Down

0 comments on commit f787b80

Please sign in to comment.