Merge pull request #75 from Azure/epoch
improve documentation for epoch receiver
This commit is contained in:
Коммит
6fe7f25cd2
11
receiver.go
11
receiver.go
|
@ -105,7 +105,16 @@ func ReceiveWithPrefetchCount(prefetch uint32) ReceiveOption {
|
|||
}
|
||||
}
|
||||
|
||||
// ReceiveWithEpoch configures the receiver to use an epoch -- see https://blogs.msdn.microsoft.com/gyan/2014/09/02/event-hubs-receiver-epoch/
|
||||
// ReceiveWithEpoch configures the receiver to use an epoch. Specifying an epoch for a receiver will cause any receiver
|
||||
// with a lower epoch value to be disconnected from the message broker. If a receiver attempts to start with a lower
|
||||
// epoch than the broker currently knows for a given partition, the broker will respond with an error on initiation of
|
||||
// the receive request.
|
||||
//
|
||||
// Ownership enforcement: Once you created an epoch based receiver, you cannot create a non-epoch receiver to the same
|
||||
// consumer group / partition combo until all receivers to the combo are closed.
|
||||
//
|
||||
// Ownership stealing: If a receiver with higher epoch value is created for a consumer group / partition combo, any
|
||||
// older epoch receiver to that combo will be force closed.
|
||||
func ReceiveWithEpoch(epoch int64) ReceiveOption {
|
||||
return func(receiver *receiver) error {
|
||||
receiver.epoch = &epoch
|
||||
|
|
|
@ -131,7 +131,7 @@ func (ts *testSuite) ensureStorageAccount() error {
|
|||
}
|
||||
}
|
||||
|
||||
_, err = client.Create(ctx, test.ResourceGroupName, ts.AccountName, storage.AccountCreateParameters{
|
||||
res, err := client.Create(ctx, test.ResourceGroupName, ts.AccountName, storage.AccountCreateParameters{
|
||||
Sku: &storage.Sku{
|
||||
Name: storage.StandardLRS,
|
||||
Tier: storage.Standard,
|
||||
|
@ -143,7 +143,11 @@ func (ts *testSuite) ensureStorageAccount() error {
|
|||
},
|
||||
})
|
||||
|
||||
return err
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return res.WaitForCompletionRef(ctx, client.Client)
|
||||
}
|
||||
|
||||
func getStorageAccountMgmtClient(subscriptionID string, env azure.Environment) *storage.AccountsClient {
|
||||
|
|
Загрузка…
Ссылка в новой задаче