Azure / azure-event-hubs-node

Node client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
MIT License
50 stars 46 forks source link

Only set message_id when provided by caller #169

Closed princjef closed 5 years ago

princjef commented 5 years ago

Description

When sending events using the Node.js Event Hubs SDK, it automatically adds the message_id property if one is not specified. This is not the same as the behavior in the .NET SDK and leads to some inconsistency in the received messages sent by the various SDKs.

This PR removes the default ids from the sent messages and updates the unit tests to check both variations to ensure that the id is set correctly. It also tweaks the relevant tests to receive from an offset rather than a time to make them more reliable.

amarzavery commented 5 years ago

:white_check_mark: Validation status: passed

File Status Preview URL Details
client/lib/eventData.ts :white_check_mark:Succeeded
client/lib/eventHubSender.ts :white_check_mark:Succeeded
client/tests/misc.spec.ts :white_check_mark:Succeeded

For more details, please refer to the build report.

Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.