Skip to content

[SB] Get message sessions #39554

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

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Conversation

l0lawrence
Copy link
Member

@l0lawrence l0lawrence commented Feb 4, 2025

No description provided.

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-servicebus

servicebus_client = ServiceBusClient(FULLY_QUALIFIED_NAMESPACE, credential)

with servicebus_client:
receiver = servicebus_client.get_queue_receiver(queue_name=QUEUE_NAME, session_id=NEXT_AVAILABLE_SESSION)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

session_id triggers creating a session receiver

@@ -678,3 +679,36 @@ def get_subscription_receiver(
)
self._handlers.add(handler)
return handler

def get_management_operation_client(self,
entity_name: str,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entity_name because what if we want to do a mgmt operation on a topic...
could also do queue_name, topic_name as kwargs

:return: List of session ids.
:rtype: List[str]
"""
if kwargs:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only works on queues

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

b'A sessionful message receiver cannot be created on an entity that does not require sessions. Ensure RequiresSession is set to true when creating a Queue or Subscription to enable sessionful behavior.`

the service error is great along with good documentation

@l0lawrence
Copy link
Member Author

/azp run python - servicebus - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@l0lawrence
Copy link
Member Author

/azp run python - servicebus - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

Hi @l0lawrence. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-recent-activity There has been no recent activity on this issue. Service Bus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants