Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServiceBusSender Identifier not set. #46952

Open
woodylaurence opened this issue Nov 1, 2024 · 4 comments
Open

ServiceBusSender Identifier not set. #46952

woodylaurence opened this issue Nov 1, 2024 · 4 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Bus
Milestone

Comments

@woodylaurence
Copy link

woodylaurence commented Nov 1, 2024

Library name and version

Azure.Messaging.ServiceBus v7.18.0+

Describe the bug

When creating a ServiceBusSender using ServiceBusClient.CreateSender() the returned Sender does not have its Identifier correctly set based off the queue/topic name.
This used to work < 7.18.0.

Expected behavior

ServiceBusClient.CreateSender() should return ServiceBusSender with Identifier set as -.

Actual behavior

Identifier is set as "-".

Reproduction Steps

using Azure.Identity;
using Azure.Messaging.ServiceBus;

namespace ConsoleApp1;

class Program
{
	static void Main(string[] args)
	{
		var serviceBusClient = new ServiceBusClient("service-bus-name.servicebus.windows.net", new DefaultAzureCredential());
		var serviceBusSender = serviceBusClient.CreateSender("queue-name");
	}
}

Environment

No response

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus labels Nov 1, 2024
Copy link

github-actions bot commented Nov 1, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@jsquire jsquire assigned jsquire and unassigned JoshLove-msft Nov 1, 2024
@jsquire jsquire added bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Nov 1, 2024
@jsquire jsquire added this to the 2025-01 milestone Nov 1, 2024
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Nov 1, 2024
@jsquire
Copy link
Member

jsquire commented Nov 1, 2024

Hi @woodylaurence. Thanks for reaching out and we regret that you're experiencing difficulties. Confirming that this is a bug that was introduced this commit, which changed the flow where the identifier is being created. The code should have been updated to use the entityPath parameter instead of EntityPath property, which is not yet initialized. Looks like ServiceBusClient is also impacted. We'll get this fixed up and hope to have it available for our next release in early January.

In the meantime, mitigation would be to use the options to explicitly set an identifier. The following will restore the intended behavior:

await using var client = new ServiceBusClient"<< Fully Qualified Namespace >>", new DefaultAzureCredential());

var entityPath = "myQueue";
var options = new ServiceBusSenderOptions { Identifier = $"{entityPath}-{Guid.NewGuid()}" };
var sender = client.CreateSender(entityPath, options);

@woodylaurence
Copy link
Author

Thanks @jsquire !

Solution will work for us for now and will keep an eye out for the release so that we can revert the temporary fix.

@jsquire
Copy link
Member

jsquire commented Nov 27, 2024

fixed by #47346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Bus
Projects
None yet
Development

No branches or pull requests

3 participants