2019-09-09 5.0.0-preview.3
Features
- Adds load-balancing capabilities to
EventProcessor
.EventProcesor
will use the data fromPartitionManager
to regulate how many partitions it should read from.
(PR #4839). - Adds
lastEnqueuedEventInfo
property onEventHubConsumer
. When the consumer is created withtrackLastEnqueuedEventInfo
set totrue
, thelastEnqueuedEventInfo
field is updated everytime a message is received and provides details about the last enqueued event in the partition theEventHubConsumer
is reading from.
(PR #5036) - Received event data will now expose
systemProperties
for message annotations set by the service. (PR #5008). - Improved error messages when constructing an
EventHubClient
with an invalid connection string and Event Hub name combo. (PR #4899). - Adds client-side type-checking for
EventPosition
static helper methods. (PR #5052).
Breaking changes
- The
PartitionProcessor
interface is now a class with default implementations ofinitialize
,close
,processEvents
, andprocessError
.
(PR #4994).- Users should extend the
PartitionProcessor
class and override any of the methods that need custom logic. - All 4 methods now accept
PartitionContext
as the last parameter.
PartitionContext
contains information about the partition being processed, as well as theupdateCheckpoint
method that can be used to persist a checkpoint.
- Users should extend the
- The
EventProcessor
constructor was changed to no longer accept aPartitionProcessorFactory
function that returns aPartitionProcessor
.
Instead, users should extend thePartitionProcessor
class and pass the class (not an instance of the class) to theEventProcessor
constructor.
(PR #4994).