How to use the azure-servicebus.azure.servicebus.models.Subscription function in azure-servicebus

To help you get started, we’ve selected a few azure-servicebus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-servicebus / azure / servicebus / _serialization.py View on Github external
The xml format for subscription:

    <content type="application/xml">
    
        PT5M
        false
        P10675199DT2H48M5.4775807S
        false
        true
    
    </content>

    '''
    subscription = Subscription()

    subscription_element = entry_element.find('./atom:content/sb:SubscriptionDescription', _etree_sb_feed_namespaces)
    if subscription_element is not None:
        mappings = [
            ('LockDuration', 'lock_duration', None),
            ('RequiresSession', 'requires_session', _parse_bool),
            ('DefaultMessageTimeToLive', 'default_message_time_to_live', None),
            ('DeadLetteringOnFilterEvaluationExceptions', 'dead_lettering_on_filter_evaluation_exceptions', _parse_bool),
            ('DeadLetteringOnMessageExpiration', 'dead_lettering_on_message_expiration', _parse_bool),
            ('EnableBatchedOperations', 'enable_batched_operations', _parse_bool),
            ('MaxDeliveryCount', 'max_delivery_count', int),
            ('MessageCount', 'message_count', int),
        ]

        for map in mappings:
            _read_etree_element(subscription_element, map[0], subscription, map[1], map[2])

azure-servicebus

Microsoft Azure Service Bus Client Library for Python

MIT
Latest version published 1 month ago

Package Health Score

96 / 100
Full package analysis