Update to the GA version of go-amqp (#288)

* Update to the GA version of go-amqp

Updated readme message with GA announcement of azeventhubs.

* update changelog and version info

* update internal pipeline to supported version of Ubuntu

* check for specific error conditions that are now explicitly returned
This commit is contained in:
Joel Hendrix 2023-05-24 15:53:35 -07:00 коммит произвёл GitHub
Родитель 1761881894
Коммит c07509cff9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 21 добавлений и 11 удалений

Просмотреть файл

@ -1,5 +1,9 @@
# Change Log
## `v3.6.0`
- Updated to latest `azure-amqp-common-go` and GA version of `go-amqp` modules.
## `v3.5.0`
- Updated to latest `azure-amqp-common-go` and `go-amqp` modules.

Просмотреть файл

@ -6,7 +6,7 @@ variables:
pr: none
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
steps:
- task: GoTool@0

4
go.mod
Просмотреть файл

@ -3,11 +3,11 @@ module github.com/Azure/azure-event-hubs-go/v3
go 1.18
require (
github.com/Azure/azure-amqp-common-go/v4 v4.1.0
github.com/Azure/azure-amqp-common-go/v4 v4.2.0
github.com/Azure/azure-pipeline-go v0.2.3
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible
github.com/Azure/azure-storage-blob-go v0.15.0
github.com/Azure/go-amqp v0.19.1
github.com/Azure/go-amqp v1.0.0
github.com/Azure/go-autorest/autorest v0.11.28
github.com/Azure/go-autorest/autorest/adal v0.9.21
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2

8
go.sum
Просмотреть файл

@ -1,13 +1,13 @@
github.com/Azure/azure-amqp-common-go/v4 v4.1.0 h1:gcS6P4q/Qv1nmdq1IWoU3mLYlHnvNxAhVjxReEFmSz8=
github.com/Azure/azure-amqp-common-go/v4 v4.1.0/go.mod h1:HDiTPilyFCWPOT8dBeSjGztqgrW27LctWs/4p6nR9FY=
github.com/Azure/azure-amqp-common-go/v4 v4.2.0 h1:q/jLx1KJ8xeI8XGfkOWMN9XrXzAfVTkyvCxPvHCjd2I=
github.com/Azure/azure-amqp-common-go/v4 v4.2.0/go.mod h1:GD3m/WPPma+621UaU6KNjKEo5Hl09z86viKwQjTpV0Q=
github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U=
github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k=
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw=
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-storage-blob-go v0.15.0 h1:rXtgp8tN1p29GvpGgfJetavIG0V7OgcSXPpwp3tx6qk=
github.com/Azure/azure-storage-blob-go v0.15.0/go.mod h1:vbjsVbX0dlxnRc4FFMPsS9BsJWPcne7GB7onqlPvz58=
github.com/Azure/go-amqp v0.19.1 h1:S1l3HiSMU7Rhko2f70lBH6Vd0mLj5UZiTWC6xKY5Kho=
github.com/Azure/go-amqp v0.19.1/go.mod h1:+bg0x3ce5+Q3ahCEXnCsGG3ETpDQe3MEVnOuT2ywPwc=
github.com/Azure/go-amqp v1.0.0 h1:QfCugi1M+4F2JDTRgVnRw7PYXLXZ9hmqk3+9+oJh3OA=
github.com/Azure/go-amqp v1.0.0/go.mod h1:+bg0x3ce5+Q3ahCEXnCsGG3ETpDQe3MEVnOuT2ywPwc=
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=

Просмотреть файл

@ -400,7 +400,11 @@ func testBatchSendTooLarge(ctx context.Context, t *testing.T, client *Hub, _ str
}
ebi := NewEventBatchIterator(events...)
assert.EqualError(t, client.SendBatch(ctx, ebi, BatchWithMaxSizeInBytes(10000000)), "encoded message size exceeds max of 1048576")
err := client.SendBatch(ctx, ebi, BatchWithMaxSizeInBytes(10000000))
var amqpErr *amqp.Error
require.ErrorAs(t, err, &amqpErr)
assert.EqualValues(t, amqp.ErrCondMessageSizeExceeded, amqpErr.Condition)
assert.EqualValues(t, amqpErr.Description, "encoded message size exceeds max of 1048576")
}
func testBasicSendAndReceive(ctx context.Context, t *testing.T, client *Hub, partitionID string) {

Просмотреть файл

@ -1,5 +1,5 @@
**Please note, a new beta package is available: [azeventhubs](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azeventhubs/README.md) as of [2022-11-09].**
**See the [Migration Guide](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azeventhubs/migrationguide.md) for more details.**
**Please note, a newer package is available: [azeventhubs](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azeventhubs/README.md) as of [2023-05-09].**
**We strongly encourage you to upgrade. See the [Migration Guide](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/messaging/azeventhubs/migrationguide.md) for more details.**
# Microsoft Azure Event Hubs Client for Golang
[![Go Report Card](https://goreportcard.com/badge/github.com/Azure/azure-event-hubs-go)](https://goreportcard.com/report/github.com/Azure/azure-event-hubs-go)

Просмотреть файл

@ -309,6 +309,8 @@ func sendMessage(ctx context.Context, getAmqpSender getAmqpSender, maxRetries in
if e.Condition == errorServerBusy || e.Condition == errorTimeout {
recoverLink(sender.LinkName(), err, false)
break
} else if e.Condition == amqp.ErrCondMessageSizeExceeded || e.Condition == amqp.ErrCondTransferLimitExceeded {
return e
}
recoverLink(sender.LinkName(), err, true)
case net.Error:

Просмотреть файл

@ -2,5 +2,5 @@ package eventhub
const (
// Version is the semantic version number
Version = "3.5.0"
Version = "3.6.0"
)