Skip to content

Commit

Permalink
Adding a Path getters to entity type. (Azure#60)
Browse files Browse the repository at this point in the history
* Adding a Path getters to entity type.

This will reduce functionality introduced in both Azure#35 and https://github.com/marstr/azure-service-bus-go/tree/sessions

* Refactoring after feedback and investigation

After diving through the C# codebase some more, I found that the usage needed for entityPaths is actually just it's name without the AMQP connection string appended. You can see that here: https://github.com/Azure/azure-service-bus-dotnet/blob/435c25957c131c32d68b4966a1d4e83acaf01a0b/src/Microsoft.Azure.ServiceBus/QueueClient.cs#L264

I continued to keep entity.ManagementPath for convenience.
  • Loading branch information
marstr authored and benbp committed Sep 15, 2021
1 parent d3382da commit 1985d08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions queue.go
Expand Up @@ -25,6 +25,7 @@ package servicebus
import (
"context"
"encoding/xml"
"fmt"
"sync"

"github.com/Azure/azure-amqp-common-go/log"
Expand Down Expand Up @@ -239,3 +240,7 @@ func (q *Queue) ensureSender(ctx context.Context) error {
}
return nil
}

func (e *entity) ManagementPath() string {
return fmt.Sprintf("%s/$management", e.Name)
}

0 comments on commit 1985d08

Please sign in to comment.