Blob depolama Depolama denetim noktası deposu olarak kullanma - Event Hubs'Azure Stack Hub

Denetim noktası deposu olarak Azure Blob Depolama'ı, Depolama Blob SDK'sı'nın normalde Azure'da bulunanlardan farklı bir sürümünü destekleyen bir ortamda kullanıyorsanız, Depolama hizmeti API'si sürümünü bu ortam tarafından desteklenen belirli bir sürüme değiştirmek için kod kullanmalıdır. Örneğin, Event Hubs'i Azure Stack Hub 2002sürümünde çalıştırdıysanız, Depolama hizmetinin en yüksek kullanılabilir sürümü 2017-11-09 sürümüdür. Bu durumda, Depolama hizmeti API'si sürümünü 2017-11-09 sürümüne hedeflemek için kod kullanacağız. Belirli bir API sürümünü hedeflemek için Depolama örnek için aşağıdaki örneklerde yer alan GitHub:

Denetim noktası Event Hubs blob depolama alanı olarak Blob Depolama kullanan bir alıcıyı Azure Stack Hub çalıştırmadan aşağıdaki hata iletisini alırsınız:

The value for one of the HTTP headers is not in the correct format

Python'da örnek hata iletisi

Python için hata azure.core.exceptions.HttpResponseError işleyicisi hata işleyiciye on_error(partition_context, error) EventHubConsumerClient.receive() geçirildi. Ancak yöntemi receive() bir özel durum oluşturur. print(error) aşağıdaki özel durum bilgilerini yazdıracak:

The value for one of the HTTP headers is not in the correct format.

RequestId:f048aee8-a90c-08ba-4ce1-e69dba759297
Time:2020-03-17T22:04:13.3559296Z
ErrorCode:InvalidHeaderValue
Error:None
HeaderName:x-ms-version
HeaderValue:2019-07-07

Günlükleyici, aşağıdakine benzer iki uyarıyı günlüğe kaydedecek:

WARNING:azure.eventhub.extensions.checkpointstoreblobaio._blobstoragecsaio: 
An exception occurred during list_ownership for namespace '<namespace-name>.eventhub.<region>.azurestack.corp.microsoft.com' eventhub 'python-eh-test' consumer group '$Default'. 

Exception is HttpResponseError('The value for one of the HTTP headers is not in the correct format.\nRequestId:f048aee8-a90c-08ba-4ce1-e69dba759297\nTime:2020-03-17T22:04:13.3559296Z\nErrorCode:InvalidHeaderValue\nError:None\nHeaderName:x-ms-version\nHeaderValue:2019-07-07')

WARNING:azure.eventhub.aio._eventprocessor.event_processor:EventProcessor instance '26d84102-45b2-48a9-b7f4-da8916f68214' of eventhub 'python-eh-test' consumer group '$Default'. An error occurred while load-balancing and claiming ownership. 

The exception is HttpResponseError('The value for one of the HTTP headers is not in the correct format.\nRequestId:f048aee8-a90c-08ba-4ce1-e69dba759297\nTime:2020-03-17T22:04:13.3559296Z\nErrorCode:InvalidHeaderValue\nError:None\nHeaderName:x-ms-version\nHeaderValue:2019-07-07'). Retrying after 71.45254944090853 seconds

Sonraki adımlar

Bölümleme ve denetim noktası oluşturma hakkında bilgi edinmek için şu makaleye bakın: Uygulamanın birden çok örneğinde bölüm yükünü dengeleme