Граф коммитов

414 Коммитов

Автор SHA1 Сообщение Дата
microsoft-github-policy-service[bot] e8bc505481
Microsoft mandatory file (#424)
Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
2022-10-18 14:30:08 -07:00
Kasun Indrasiri 3cdc20c834
Add Service Fabric Processor package deprecation message. (#420) 2022-02-08 16:15:45 -08:00
Ramya Rao 2746e3c1fe
Update readme to point to newer packages (#417)
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
2021-05-04 14:31:59 -07:00
Jesse Squire 81a4263e4d [Event Hubs Client] ReadMe Content Updates (for archive) (#390)
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.
2019-05-17 09:40:40 -07:00
Serkant Karaca d8c1e3ef32
Don't skip expired lease check when lease owned by current host. (#387)
* Don't skip expired leases if lease owned to current host.

* Adding test

* Adding test

* test fix
2019-03-28 15:35:45 -07:00
Serkant Karaca 9added9f14
Moving Net Standard and UWP builds to Storage.Blob SDK (#369) 2019-03-21 11:15:17 -07:00
JamesBirdsall 87a7318d68
Update SFP vers to 0.5.3 for new preview release (#379) 2019-03-11 14:27:01 -07:00
Serkant Karaca fac90346d3
Make partition context public for test-ability. (#373)
* commit 1

* commmit 2

* Make PartitionContext public for easier testability.

* Remove test files
2019-03-04 13:14:52 -08:00
JamesBirdsall 146714d504
ServiceFabricProcessor CITs and product fixes (#371)
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.
2019-03-01 16:35:18 -08:00
Serkant Karaca 067e3a702e
Allow first message in batch (#375)
* 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
2019-02-28 15:55:12 -08:00
JamesBirdsall 9ea74bdf7b
Client changes to support SFP (#367)
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.
2019-02-14 15:49:59 -08:00
JamesBirdsall 321f188448
ServiceFabricProcessor preview (#262)
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.
2019-02-14 10:39:17 -08:00
Serkant Karaca 4ce1613cab
Bumping up the SDK version (#366) 2019-02-13 17:04:00 -08:00
Serkant Karaca 65167a54ec
Provide batch object's event data enumerator publicly. (#356) 2019-02-13 13:34:55 -08:00
Serkant Karaca 293b911cfb
Making SystemProperties public addressing testability issues. (#332) 2019-02-13 12:22:03 -08:00
Serkant Karaca 11770231c5
Moving AD SDK 4.5 and Xamarin.iOS10 support (#365) 2019-02-11 15:11:17 -08:00
Serkant Karaca cec369a9fa
Reduce the number of storage calls in lease manager (#357)
* 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
2019-02-11 13:34:24 -08:00
Serkant Karaca 1c4c4c7b51
Support partition-empty in runtime metrics (#352)
* Adding partition IsEmpty support to runtime metrics

* Use AMQP client constants

* Move to correct name

* is_partition_empty is the correct name
2018-12-14 11:05:49 -08:00
David Revoledo 0511057dcb Clean more results in sync context (#348)
* Clean more results in sync context

* Order using

* Changes for https://github.com/Azure/azure-event-hubs-dotnet/pull/348#pullrequestreview-176550010

* Remove using
2018-11-30 09:54:11 -08:00
Serkant Karaca 3a6bb59c43
Omit failures in receive pump (#354) 2018-11-29 15:00:25 -08:00
David Revoledo fdd11bbbf4 Some Code Cleanups in Ampq Implementation (#349) 2018-11-28 08:27:28 -08:00
David Revoledo 8aae6b6ec1 Code CleanUps in Primitives / General (#350)
* EventHubCode Clean ups

* Code CleanUps in Primitives

* Rename variable

* Leave string cast
2018-11-27 17:24:17 -08:00
David Revoledo c5a9f0556c Change a few expecting exceptions (#351) 2018-11-19 09:32:33 -08:00
David Revoledo 27aa79c356 Use Guard Class to improve code legibility and avoid lines (#339)
* Using Guard to improve code reading and avoid lines

* Using ArgumentNotNullOrEmpty

* Complete More validations with Guard

* Replace All ArgumentNullException

* Fix Namespace
2018-11-15 09:56:12 -08:00
Serkant Karaca 1e782e7403
Max message size is 1MB now. Updating the test accordingly. (#344) 2018-11-13 14:29:45 -08:00
David Revoledo 5aad098020 Fix Tests Moving Lazy initialization at the top of the ctor (#347) 2018-11-12 11:35:07 -08:00
David Revoledo 800b20ca0d Remove Result for AzureStorageCheckpointLeaseManager GetAllLeases (#346)
* Remove Result for async call

* Get awaiter get result for GetAllLeases

* Remove useless using

* Remove useless initializator

* Replace Task Run Call

* Remove Task Run
2018-11-12 10:36:24 -08:00
David Revoledo ee96547b7f Replace Locks in AmqpEventHubClient and Code Clean ups in AmqpEventHubClient (#345)
* Replace Double lock patterns by using Lazy

* Code CleanUps in AmqpEventHubClient

* Check client management address when it is being created
2018-11-12 09:50:04 -08:00
David Revoledo 3b27eecb60 Nullify Task when The Stop is complete (#342)
* Nullfy Task when The Stop is complete

* Test for Re Register event processor

* Reset CancellationTokenSource
2018-11-08 15:25:19 -08:00
David Revoledo d19b55dcc9 Fix LazyLoad Ctor (#341) 2018-11-02 08:13:49 -07:00
David Revoledo 4aaf7551b9 Complete Missing CancellationToken (#338) 2018-11-01 17:46:18 -07:00
David Revoledo 553f749b9b Using Lazy instead of static initialization for ExceptionUtility (#337)
* Using Lazy instead of static initialization

* Use default ctor
2018-11-01 16:49:34 -07:00
David Revoledo 13c0e83bf4 Remove unit test and rename FirstPlugin (#335) 2018-10-18 12:11:28 -07:00
Serkant Karaca cb3082ea1f
Parallelize expired lease check in processor host (#333)
* Parallelize expired lease check

* -
2018-10-17 07:54:13 -07:00
David Revoledo ee7804b0f2 Prevent event data being over writed when multiple plugins called (#330) 2018-10-15 17:25:05 -07:00
David Revoledo b5c968cd71 Copy Plugins for InnerSender in AmqpEventHubClient (#329) 2018-10-15 16:49:27 -07:00
David Revoledo 9c6da772dd Implementing Plugins for EventHub (#324)
* Implement Plugin to Process each event when client is sending telemetry

*  Microsoft copyright header

* Fix Typo

* Changes for https://github.com/Azure/azure-event-hubs-dotnet/pull/324#pullrequestreview-162989181

* Implement AfterEventsReceive for EventHubsPlugin

* Implement Plugin Tests

* Sort usings

* changes for https://github.com/Azure/azure-event-hubs-dotnet/pull/324#issuecomment-428688265

* Fix Resources

* Changes for https://github.com/Azure/azure-event-hubs-dotnet/pull/324#pullrequestreview-163616505

* Change for https://github.com/Azure/azure-event-hubs-dotnet/pull/324#issuecomment-429417199

* Move Using to Namespace block
2018-10-15 14:00:38 -07:00
David Revoledo 61bdc55a5b Mark readonly fields, complete cancellation token and remove useless Where in LINQ (#326) 2018-10-10 12:36:25 -07:00
David Revoledo 6a2cb55168 Create EventHubsTimeoutException for consistency (#328) 2018-10-10 10:43:16 -07:00
David Revoledo 0419ac2721 Use Azure Storage Account NameValidator to check LeaseContainerName (#327) 2018-10-10 09:27:52 -07:00
Serkant Karaca 96ac80213d
Bumping up SDK version to 2.2.0 for release (#319) 2018-10-03 17:00:42 -07:00
Serkant Karaca fc8c24d122
EPH proxy settings for storage client. (#311)
* Wiring up proxy settings to storage client so that storage calls can go thorugh same proxy server.

* Fix NullRef
2018-10-01 08:23:00 -07:00
Serkant Karaca f90ece3b9e
Provide last exception when all retries exhausted. (#314) 2018-09-28 08:37:52 -07:00
Serkant Karaca 4fc6c60288
Don't retry runtime operation if close called on the client. (#313)
* Don't retry if close called on the client.

* Encapsulate closeCalled

* add this.
2018-09-27 15:25:22 -07:00
Serkant Karaca ba780ef864
Moving to latest Azure AMQP release - 2.3.3 (#310)
* Moving to latest Azure AMQP release - 2.3.3

* Move to 2.3.5
2018-09-26 15:13:46 -07:00
Serkant Karaca c180d62c8f
Move net461 build IdentityModel dependency to 4.X (#308)
* PrefetchCount range validation

* Mocing System.IdentityModel.Tokens.Jwt to 4.0.4 for .Net 4.6.1 build.

* Move to most recent JWT release.
2018-08-31 09:53:01 -07:00
Serkant Karaca ad4d5dd314
Copyright compliance for Nuget packaging (#307)
* PrefetchCount range validation

* Updating copyright for Microsoft SDK compliance
2018-08-30 11:12:08 -07:00
Serkant Karaca 79f1facf53
Avoid double counting of owned and expired leases. (#309) 2018-08-30 07:45:52 -07:00
Serkant Karaca b5e34e74e6
Make PartitionContext.Lease public (#304)
* PrefetchCount range validation

* Making lease public so that lease properties can be accessed through PartitionContext for logging.

* XMLDoc update
2018-08-08 13:26:29 -07:00
Fernando Antivero 4b1c26697e Fix correlation id not received from IotHub EH endpoint (#302)
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
2018-08-01 11:14:00 -07:00