Hi,
The documentation for the Python SDK forwards to the Service Bus filtering doc which indicates that CorrelationFilter works with CorrelationID, but also some other system properties and custom properties.
This is true in DotNet.
But in Python, unfortunately, this filter only works with the CorrelationID field. Our only solution is to use SqlFilter, which is apparently much less efficient.
Can you please implement in Python the ability to use CorrelationFilter with other properties ?
Hey K3ul,
Sorry for the delayed response on this, wanted to let you know I've confirmed the expected behavior from the dotnet side of things (as you describe).
If this functionality is missing, this might imply a gap in the autorest generation that builds our mgmt. code. I've added @zikalino as well due to the overlap of this issue with the mgmt. space (@zim, I'll be investigating as well so feel no pressure on my part to randomize yourself; Laurent mentioned you were relevant so looping you in)
We'll be investigating and will follow up here with any details; thanks for your patience!
Hey K3UL,
First let me apologize that this sat for so long.
Second, I did some digging into the azure-mgmt-servicebus SDK, and it appears that you can create a custom correlationfilter via ServiceBusManagementClient.rules.create_or_update(rg, namespace, topic, subscription, rule_name, parameters), see here
Might I assume from this that you were leveraging the control_client ServiceBusService within the core azure-servicebus package when you hit this blocker?
If so I'd recommend using the mgmt package if at all possible; the control_client code was initially maintained for backcompat of a prior SDK revision, and is in the process of being modernized/brought into the pending GA release (currently in preview, although this code is not present as of b2, likely will appear in the b3 or b4 releases).
Don't hesitate to shout if I'm off base with any of this or if any clarification/questions are needed.
Hi @KieranBrantnerMagee, thank you for your answer.
Indeed I am using control_client.ServiceBusService for the subscription and rule creation, as azure.servicebus.ServiceBusClient does not offer these capabilities.
I do use the new SDK for the other operations (publishing and fetching messages).
I had seen that the management package can do something like this but I have two probles with it compared to the old client :
I think subscribing and filtering is part of what any client wants to do when connecting to a topic/queue and is not management per-se. The old SDK only requires the connection string to do this, and I really do not want to start adding Azure AD credentials and things like that.
The old SDK only requires the connection string to do this, and I really do not want to start adding Azure AD credentials and things like that.
It's a very apt time for you to mention this, since we've heard similar responses from other users, reinforcing the aformentioned decision to modernize the management tooling within the core library enabled by SAS/connection string.
In that vein, as hinted at previously, we'll likely have the capabilities you want within the next 1-2 preview releases. Shout if this is a more urgent need/if a combination of sql filters and the mgmt lib don't provide sufficient workarounds in the interim; but that would otherwise be where I'd recommend to keep an eye out as we roll these features out.
(In terms of insufficient long-form docs for the mgmt lib, 100% know where you're coming from. I'll both bubble this up to our docs folks, and see if we can take any action within the SB world to give breadcrumbs or samples in leiu of that.)
That sounds great thank you ! I think it is fine to wait for a couple months and keep using the SqlFilter, it is good to know you guys are working on the management library towards this, because it is a lib I wanted to use beside the Azure AD neeed :)
As for the docs, I think they should at the very minimum point to the samples/test in the Github repos, this is usually how I find the information. But the right repo/file is not always easy to find and I know my coworkers don't necessarily think about that. For example https://github.com/Azure-Samples/service-bus-dotnet-management or https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/servicebus/azure-mgmt-servicebus/tests
Great to hear.
Wanted to follow up and mention that I've given the feedback to the mgmt docs owners, and they'll be looking to bolster that section. In the interim, I've added a small snippet to our README; let me know if you find that this would have given you enough breadcrumbs as you mention above, or if a different location/details would have been more enlightening; feel free to either comment there or here. (I had a bikesheddy debate with myself that I should have just added you as a reviewer but figured context would be useful :) )
The docs are the main breadcrumb we need but anything helps and I think indeed having it in the Readme helps having a place to look in, without having to search all over the place. For sure it would have saved me some time. Thank you !