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

Error while Forwarding messages from Subscription to a Queue on ServiceBus sdk #16933

Closed
eibrunorodrigues opened this issue Feb 25, 2021 · 4 comments · Fixed by #17430
Closed
Assignees
Labels
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. feature-request This issue requires a new behavior in the product in order be resolved. P0 Service Bus
Milestone

Comments

@eibrunorodrigues
Copy link

eibrunorodrigues commented Feb 25, 2021

  • Package Name: azure-servicebus
  • Package Version: 7.0.1
  • Operating System: Ubuntu
  • Python Version: 3.8

Describe the bug
Having some issues creating subscriptions on a topic with the flag ForwardTo pointing to a queue.

To Reproduce
Steps to reproduce the behavior:

from azure.servicebus import ServiceBusClient, ServiceBusReceivedMessage
from azure.servicebus.management import ServiceBusAdministrationClient
from azure.core.exceptions import ResourceExistsError, ResourceNotFoundError
import os


servicebus_client = ServiceBusAdministrationClient.from_connection_string(
    conn_str=os.getenv("CONNECTION_STRING"))

queue_name = "client_example"
topic_name = "topic/client_example.main"

try:
    servicebus_client.create_queue("client_example")
except ResourceExistsError:
    pass

try:
    servicebus_client.create_topic("topic/client_example.main")
except ResourceExistsError:
    pass

try:
    servicebus_client.create_subscription(
        topic_name=topic_name,
        subscription_name=queue_name,
        forward_to=queue_name
    )
except ResourceExistsError:
    pass

Expected behavior
I'm creating a subscription that forwards all messages to a queue, this code works on C# sdk.

Screenshots
image

Additional context
Error is thrown while attempting to forward-to messages to a queue:
Exception has occurred: HttpResponseError (note: full exception trace is shown but execution is paused at: _run_module_as_main) BR0012The specified value is in an invalid format. Parameter name: ForwardTo. TrackingId:614b32a2-b307-4e2e-9688-7b797f0cc32a_G19, SystemTracker:odin-hml:Topic:topic/client_example.main, Timestamp:2021-02-25T13:01:55

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 25, 2021
@eibrunorodrigues eibrunorodrigues changed the title Error while Forwarding messages from Subscription to a Queue Error while Forwarding messages from Subscription to a Queue on ServiceBus sdk Feb 25, 2021
@eibrunorodrigues
Copy link
Author

I was able to use ForwardTo using the sb protocol: sb://MYSB.servicebus.windows.net/{QUEUE_NAME}.
So the question is, on the C# SDK we don't need to do that, just the destination for the messages.

Should this be a requirement on Python SDK?

@xiangyan99 xiangyan99 added 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. Service Bus labels Feb 25, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 25, 2021
@xiangyan99 xiangyan99 removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Feb 25, 2021
@xiangyan99 xiangyan99 added this to the [2021] March milestone Feb 25, 2021
@xiangyan99
Copy link
Member

Thanks for the feedback, we’ll investigate asap.

@yunhaoling
Copy link
Contributor

yunhaoling commented Feb 26, 2021

hey @eibrunorodrigues , thanks for reaching out.

as you mentioned, we currently only support the full path: sb://<NAMESPACE>.servicebus.windows.net/{QUEUE_NAME} for the forward_to parameter.

The requirement seems reasonable to me, I'll do a cross-language check first to see how other languages on dealing with the forward_to parameter(Java, Javascript, .Net) and then add support for it if we decide that we want it.

I'll keep posting updates here.

@yunhaoling yunhaoling added feature-request This issue requires a new behavior in the product in order be resolved. and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Feb 26, 2021
@eibrunorodrigues
Copy link
Author

@yunhaoling Yeah, I was able to forward messages with the full path. I'll be waiting for the updates, thank you so much!

@yunhaoling yunhaoling modified the milestones: [2021] March, [2021] April Mar 1, 2021
@lmazuel lmazuel added the P0 label Mar 11, 2021
@yunhaoling yunhaoling removed their assignment Mar 11, 2021
@swathipil swathipil linked a pull request Mar 19, 2021 that will close this issue
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Dec 9, 2021
Microsoft.SecurityInsights 2021-09-01-preview (Azure#16933)

* Adds base for updating Microsoft.SecurityInsights from version preview/2021-03-01-preview to version 2021-09-01-preview

* Updates readme

* Updates API version in new specs and examples

* Microsoft.security insights 2021 09 01 preview add missing resources (Azure#15531)

* Copy missing resources specs and examples from 2019-01-01-preview

* Update added resources specs and examples and extract common types

* Update readme

* Extract ClientInfo, UserInfo and Lable to common types

* Fix SpellCheck and Avocado

* Return ThreatIntelligence to readme

* Fix broken refs in Watchlists

* Resolve duplicate schema errors

* Run prettier

* Make common types prettier

* Add required property to operations according to ARM requirments

* Fix readme

* Add file separators to readme

* Rename example file

* Supress OBJECT_ADDITIONAL_PROPERTIES

* Add 'where' to OBJECT_ADDITIONAL_PROPERTIES supression

* Move OBJECT_ADDITIONAL_PROPERTIES supression under general Supression section.

* Copy dataConnectors from 2021-03-01-preview

* Update version of dataConnectors (this was done as there were errors when trying to generate C# client. Copying and changing version again fixed the problem).

* Add dataConnectorsCheckRequirments path, parameters and definitions from 2019-01-01-preveiw

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Use newest common types in new 2021-09-01-preview API version (Azure#15778)

* Use newest common types in AlertRules

* Use newest common types in AutomationRules

* Use newest common types in Bookmarks

* Use newest common types in dataConnectors

* Use newest common types in Enrichment

* Use newest common types in Entities

* Use newest common types in EntityQueries

* Use newest common types in Incidents

* Use newest common types in Metadata

* Use newest common types in OfficeConsents

* Use newest common types in OnboardingStates

* Use newest common types in operations

* Use newest common types in Settings

* Use newest common types in SourceControls

* Use newest common types in ThreatIntelligence

* Use newest common types in Watchlist

* Use newest common types in EntityTypes

* Use newest common types in RelationTypes

* Fix ThreatIntelligence

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add template version to the scheduled alert rule + scheduled template (Azure#15919)

* Add template version to the scheduled alert rule

* Update AlertRules.json

* Update AlertRules.json

* Update AlertRules.json

* Update AlertRules.json

* Update GetAlertRuleTemplates.json

* Update GetAlertRuleTemplateById.json

* add aws s3 connector (Azure#15844)

* Add a new kind of alert rules - NRT (Azure#15980)

* add NRT rule

* add NRT rule

* add NRT rule

* add NRT rule

* fix typo

* fix typo

* fix

* Align new Metadata feature with 2021-03-01-preview (Azure#16304)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add fixes from 2021-03-01-preview (Azure#16238)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add entity query templates (Azure#16269)

* Add entity query templates from 2021-03-01-preview

* Update version

* Use newest common types and update readme

* Fix conflicting common types

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Fix bookmark relations operatinIds to be consistent with other operationIds. (Azure#16519)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add corrections from 2021-03-01-preview (Azure#16490)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Remove unused parameters (Azure#16619)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Update readme default readme tag for client generation (Azure#16620)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Use CloudError instead of ErrorResponse to avoid breaking change (Azure#16691)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Add data connectors polling ccp api support (Azure#16293)

* adding dataConnectors polling CCP api Support. (witout tests validations)

* azure sentinel dataconnectors update examples

* azure sentinel dataConnectors examples update and fix

* azure sentinel dataConnectors prettier

* azure sentinel dataConnectors add connect disconnect examples update path

* azure sentinel dataConnectors add connect disconnect examples fix

* azure sentinel dataConnectors add connect disconnect examples fix 2

* azure sentinel dataConnectors rebase dataConnectors dev

* azure sentinel dataconnectors - fix put to post on connect and disconnect endpoints

* azure sentinel dataconnectors - adding x-ms-secret to password on connect

* azure sentinel dataconnectors - connect/disconnect endpoint remove unnedded 201 return

* azure sentinel dataConnectors - remove empty body DataConnectorDisconnectBody

Co-authored-by: Alon Danoch <adanoch@microsoft.com>

* Add office IRM Connector (Azure#16764)

* Add office IRM

* fix

* fix

* fix

* fix

Co-authored-by: omerhaimov <omer.haimovich@gmail.com>

* Add teamInformation to IncidentProperties 2021-09-01-preview (Azure#16787)

* Fix Swagger for SecurityInsights - Add teamInformation to IncidentProperties

* Try change description as advised by Swagger reviewer Yuchao Yan to fix the validation error.

* Revert change in ntDomain description as it has nothing to do with validations

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Make CloudError and CloudErrorBody external resources (already exist under Microsoft.Rest.Azure namespace) (Azure#16872)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Remove operational insights parameter 2021 09 01 preview (Azure#16891)

* Remove operationalInsightsResourceProvider parameter from specs

* Remove parameter from examples

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>

* Update EntityTypes.json (Azure#16972)

Co-authored-by: Anat Gilenson <anatgilenson@microsoft.com>
Co-authored-by: Amit Bergman <38046493+Amitbergman@users.noreply.github.com>
Co-authored-by: sagamzu <52034287+sagamzu@users.noreply.github.com>
Co-authored-by: necoh <53861229+necoh@users.noreply.github.com>
Co-authored-by: alondanoch <alondanoch@hotmail.com>
Co-authored-by: Alon Danoch <adanoch@microsoft.com>
Co-authored-by: omerhaimov <55688621+omerhaimov@users.noreply.github.com>
Co-authored-by: omerhaimov <omer.haimovich@gmail.com>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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. feature-request This issue requires a new behavior in the product in order be resolved. P0 Service Bus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants