This PR updates the repo readme for the older Event Hubs packages to include pointer to the new packages and the migration guide
As discussed offline, this is in an attempt to guide users to the new package where there is active development while the above packages continue to get critical bug fixes
Updated copy to reflect the new location for the Event Hubs client library
and status of this repository as transitioning to a historical archive.
The contents have been massaged to more closely match the format and voice used
for the Event Hubs client ReadMe in the central repository, in order to ease
the cognitive burden for those navigating over. An attempt was also made to
keep the original introductory content and context.
This PR includes:
* Xunit-based check-in tests for ServiceFabricProcessor
* fixes for some product issues that were found during test development
* product features that were waiting on changes to the underlying EH client which are now available in client 3.0.0
Product Changes
* PrefetchCount and ReceiveTimeout options are hooked up.
* Receiver runtime metrics are hooked up.
* Catches exceptions thrown out of IEventProcessor.ProcessEventsAsync and IEventProcessor.ProcessErrorsAsync, preventing them from killing the service.
* Cleanup on shutdown is more robust: errors in one stage of cleanup will not prevent later stages from attempting to run.
Test Changes
* Xunit-based check-in test cases: these are entirely mocked and do not require a Service Fabric cluster or an Event Hub to run.
* Changes to EventHubWrappers and EventHubMocks to improve testability.
* commit 1
* commmit 2
* Allow first message in the batch regardless of size check.
* Assure we send at least a message.
* Test cleanup
* Fix test CreateReceiverWithInclusiveOffset
* Remove test files
* Fix build failures
Three changes in the client needed to support SFP or SFP testing:
1) A previous PR added the ability to set EventData.SystemProperties, but it is not much use without the ability to create a new SystemPropertiesCollection instance. SFP testing does not need to set individual values on a SystemPropertiesCollection, just create new instances with values that do not change after creation time, so I added a public constructor which sets all the values.
2) SFP was previously creating EventHubClients with connection strings, but there is no string syntax for setting the operation timeout, and the message pump feature on PartitionReceiver uses the operation timeout. The easiest way to let SFP set the operation timeout is to make public the existing EventHubClient.Create call which takes a ConnectionStringBuilder.
3) Originally, SFP was a friend assembly of the client, the same as EPH, but it was decided that that was not the best design. Supporting the EnableReceiverRuntimeMetric option requires the ability to create new ReceiverRuntimeInformation instances (made constructor public) and update the values from a received EventData. Copying the values in SFP code would require making a bunch of properties on EventData public get, and the corresponding properties on ReceiverRuntimeInformation public set. Instead, I added an Update method which takes an EventData and performs the copy within the client assembly so no visibility change is required. Also modified the EPH code to use the new Update method.
This is the code that built and released as preview version 0.5.2 https://www.nuget.org/packages/Microsoft.Azure.EventHubs.ServiceFabricProcessor/0.5.2
At the time it couldn't be merged with dev due to test issues from unrelated work, so we did the release from the SFprocessor branch. Those issues have been resolved, and we expect that future preview releases will come from dev branch.
* Couple improvements in Azure Lease Manager to reduce numberof storage calls.
* N/A as partition id
* Go with default timeout
* Moving to most recent AMQP release
* Fix flaky EPH test
* Adding 30 seconds default operation timeout back to tests.
* Reducing EPH to storage IO calls.
* Couple more fixes
* .
* Set token for owned leases.
* Refresh lease before acquiring in processor host.
* Fix metada removal order during lease release.
* Update lease token only for already running pumps to avoid resetting receiver position data.
* FetchAttributesAsync of blob as part of GetAllLeasesAsync() call.
* Refresh lease before attempting to steal
* Don't retry if we already lost the lease during receiver open.
* Don't attempt to steal if owner has changed from the calculation time to refresh time.
* -
* Partition pump to close when hit ReceiverDisconnectedException since this is not recoverable.
* -
* Ignore any failure during releasing the lease
* Don't update pump token if token is empty
* Nullify the owner on the lease in case this host lost it.
* Increment ourLeaseCount when a lease is acquired.
* Correcting task list
* No need to assign pump lease token to downloaded lease.
* comment update
* comment update
* Clear ownership on partial acquisition.
* Clear ownership on partial acquisition.
* Make sure we don't leave the lease as owned if acquisition failed.
* Adding logs to debug lease corruption bug
* Adding logs to debug lease corruption bug
* Small fix at steal lease check
* Protect subject iterator variable during task creation in for loops.
* .
* Renew lease right after ChangeLease call
* Don't create pump if partition expired or already moved to some other host.
* Use refreshed lease while creating partition pump.
* Remove temporary debug logs.
* Addressing SJ's comments
* Remove obsolete
* Using Guard to improve code reading and avoid lines
* Using ArgumentNotNullOrEmpty
* Complete More validations with Guard
* Replace All ArgumentNullException
* Fix Namespace
* Remove Result for async call
* Get awaiter get result for GetAllLeases
* Remove useless using
* Remove useless initializator
* Replace Task Run Call
* Remove Task Run
copy properties from an amqp message into the the event data system
properties collection when updating the event data headers and
properites.
- follow the code style from Azure EH Amqp dotnet: 9b421a7ebe/Microsoft.Azure.Amqp/Amqp/Framing/Properties.cs (L65)
- add some coverage that helps to test and understand how to reprod
resolved: #242