github Azure/azure-sdk-for-go sdk/messaging/azservicebus/v0.4.0

latest releases: sdk/data/azcosmos/v1.2.0, sdk/security/keyvault/azcertificates/v1.3.0, sdk/security/keyvault/azkeys/v1.3.0...
pre-release2 years ago

0.4.0 (2022-04-06)

Features Added

  • Support for using a SharedAccessSignature in a connection string. Ex: Endpoint=sb://<sb>.servicebus.windows.net;SharedAccessSignature=SharedAccessSignature sr=<sb>.servicebus.windows.net&sig=<base64-sig>&se=<expiry>&skn=<keyname> (#17314)

Bugs Fixed

  • Fixed bug where message batch size calculation was inaccurate, resulting in batches that were too large to be sent. (#17318)
  • Fixing an issue with an entity not being found leading to a longer timeout than needed. (#17279)
  • Fixed the RPCLink so it does better handling of connection/link failures. (#17389)
  • Fixed issue where a message lock expiring would cause unnecessary retries. These retries could cause message settlement calls (ex: Receiver.CompleteMessage)
    to appear to hang. (#17382)
  • Fixed issue where a cancellation on ReceiveMessages() would work, but wouldn't return the proper cancellation error. (#17422)

Breaking Changes

  • This module now requires Go 1.18
  • Multiple functions have had options parameters added.
  • SessionReceiver.RenewMessageLock has been removed - it isn't used for sessions. SessionReceivers should use SessionReceiver.RenewSessionLock.
  • The admin.Client type has been changed to conform with the latest Azure Go SDK guidelines. As part of this:
    • Embedded *Result structs in admin.Client's APIs have been removed. Inner *Properties values have been hoisted up to the *Response instead.

    • .Response fields have been removed for successful results. These will be added back using a different pattern in the next release.

    • Fields that were of type time.Duration have been changed to *string, where the value of the string is an ISO8601 timestamp.
      Affected fields from Queues, Topics and Subscriptions: AutoDeleteOnIdle, DefaultMessageTimeToLive, DuplicateDetectionHistoryTimeWindow, LockDuration.

    • Properties that were passed as a parameter to CreateQueue, CreateTopic or CreateSubscription are now in the options parameter (as they were optional):
      Previously:

      // older code
      adminClient.CreateQueue(context.Background(), queueName, &queueProperties, nil)	  

      And now:

      // new code
      adminClient.CreateQueue(context.Background(), queueName, &admin.CreateQueueOptions{
        Properties: queueProperties,
      })
    • Pagers have been changed to use the new generics-based runtime.Pager:

      Previously:

      // older code
      for queuePager.NextPage(context.TODO()) {
      	  for _, queue := range queuePager.PageResponse().Items {
      		  fmt.Printf("Queue name: %s, max size in MB: %d\n", queue.QueueName, *queue.MaxSizeInMegabytes)
      	  }
        }
      
      if err := queuePager.Err(); err != nil {
        panic(err)
      }

      And now:

      // new code
      for queuePager.More() {
      	  page, err := queuePager.NextPage(context.TODO())
      
      	  if err != nil {
      		  panic(err)
      	  }
      
      	  for _, queue := range page.Queues {
      		  fmt.Printf("Queue name: %s, max size in MB: %d\n", queue.QueueName, *queue.MaxSizeInMegabytes)
      	  }
        }

Don't miss a new azure-sdk-for-go release

NewReleases is sending notifications on new releases.