Skip to content

Instantly share code, notes, and snippets.

View yunhaoling's full-sized avatar
🧑‍🚀
Enjoy coding

Adam Ling yunhaoling

🧑‍🚀
Enjoy coding
View GitHub Profile
@yunhaoling
yunhaoling / sb_amqp_body_type.md
Last active March 25, 2021 18:45
AMQP Body Type

The AMQP protocol supports:

  • AMQP Data: list of bytes
  body = 'str'
  body = b'str'
  • AMQP Sequence: list of object, each object must be of a type supported by AMQP.
@yunhaoling
yunhaoling / servicebus-track2-four-client-approach.md
Last active February 12, 2020 23:05
ServiceBus Track2 4 Client APIs
class QueueSenderClient:
    def __init__(self, fully_qualified_namespace, queue_name, credential : TokenCredential, session=None, **kwargs)
    def from_queue(self, fully_qualified_namespace, queue_name, credential, session=None, **kwargs)
    def from_connection_string(self, conn_str, queue_name=None, session=None, **kwargs)
    
    def open(self)
    def close(self)
    def __enter__(self)
    def __exit(self)
@yunhaoling
yunhaoling / servicebus-track2-unified-proposal.md
Last active February 19, 2020 02:17
ServiceBus Track2 Unified Proposal

Approach 1

APIs:

class SeviceBusSenderClient:
    def __init__(self, fully_qualified_namespace, entity_name, credential, **kwargs):
    def from_queue(cls, fully_qualified_namepsace, queue_name, credential, **kwargs):
    def from_topic(cls, fully_qualified_namespace, topic_name, credential, **kwargs):
    def from_connection_string(cls, conn_str, queue_name=None, topic_name=None, **kwargs):
    
@yunhaoling
yunhaoling / servicebus-track1-apis.md
Last active February 6, 2020 22:58
ServiceBus Track1 APIs
class ServiceBusClient:
    def __init__(self, service_namespace=None, host_base=SERVICE_BUS_HOST_BASE,
        shared_access_key_name=None, shared_access_key_value=None,
        http_request_timeout=DEFAULT_HTTP_TIMEOUT, http_request_session=None,
        debug=False):

    @classmethod
    def from_connection_string(cls, conn_str, **kwargs):
@yunhaoling
yunhaoling / python_eventhub_t1_vs_t2.md
Last active December 19, 2019 04:04
[EventHubs] Python Track1 and Track2 Feature Parity

Python EventHubs Track1 and Track2 Feature Parity

Only for public APIs

EventHubClient

T1: EventHubClient T2: EventHubConsumerClient/EventHubProducerClient