From e1265f716de2d6a2f3a3a63e23534c72f1e0d6bf Mon Sep 17 00:00:00 2001 From: Larry Osterman Date: Wed, 5 Jun 2024 14:56:25 -0700 Subject: [PATCH] Align eventhubs connection property names with Go (#5693) * Align eventhubs connection property names with Go Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> * Changelog * Fixed extra value caught by Anton --------- Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> --- .../azure-messaging-eventhubs/CHANGELOG.md | 4 +++- .../src/private/eventhubs_utilities.hpp | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md b/sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md index 5bbec8635..b58e6774e 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md +++ b/sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md @@ -8,13 +8,15 @@ ### Bugs Fixed +- Fixed eventhub connection properties to better align with the names used by other Azure SDKs. + ### Other Changes ## 1.0.0-beta.8 (2024-05-07) ### Features Added -- Added new features for upcoming Event Hubs service release. +- Added support for the EventHubs emulator. ## 1.0.0-beta.7 (2024-04-09) diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/private/eventhubs_utilities.hpp b/sdk/eventhubs/azure-messaging-eventhubs/src/private/eventhubs_utilities.hpp index ee57944aa..3973fc1fa 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/private/eventhubs_utilities.hpp +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/private/eventhubs_utilities.hpp @@ -263,19 +263,19 @@ namespace Azure { namespace Messaging { namespace EventHubs { namespace _detail public: template static void SetUserAgent(T& options, std::string const& applicationId) { - constexpr const char* packageName = "cpp-azure-messaging-eventhubs-cpp"; + constexpr const char* packageName = "azure-messaging-eventhubs-cpp"; - options.Properties.emplace("Product", +packageName); - options.Properties.emplace("Version", PackageVersion::ToString()); + options.Properties.emplace("product", packageName); + options.Properties.emplace("version", PackageVersion::ToString()); #if defined(AZ_PLATFORM_WINDOWS) - options.Properties.emplace("Platform", "Windows"); + options.Properties.emplace("platform", "Windows"); #elif defined(AZ_PLATFORM_LINUX) - options.Properties.emplace("Platform", "Linux"); + options.Properties.emplace("platform", "Linux"); #elif defined(AZ_PLATFORM_MAC) - options.Properties.emplace("Platform", "Mac"); + options.Properties.emplace("platform", "Mac"); #endif options.Properties.emplace( - "User-Agent", + "user-agent", Azure::Core::Http::_detail::UserAgentGenerator::GenerateUserAgent( packageName, PackageVersion::ToString(), applicationId)); }