2019-12-03 5.0.0b6
Breaking changes
- All exceptions should now be imported from
azure.eventhub.exceptions
. - Introduced separate
EventHubSharedKeyCredential
objects for synchronous and asynchronous operations.
For async, import the credentials object from theazure.eventhub.aio
namespace. EventData
- Renamed property
application_properties
toproperties
. EventData
no longer has attributelast_enqueued_event_properties
- use this onPartitionContext
instead.
- Renamed property
EvenDataBatch
EventDataBatch.try_add
has been renamed toEventDataBatch.add
.- Renamed property
size
tosize_in_bytes
. - Renamed attribute
max_size
tomax_size_in_bytes
.
EventHubConsumerClient
andEventHubProducerClient
- Renamed method
get_properties
toget_eventhub_properties
. - Renamed parameters in constructor:
host
tofully_qualified_namespace
,event_hub_path
toeventhub_name
. - Renamed parameters in
get_partition_properties
:partition
topartition_id
. - Renamed parameter
consumer_group_name
toconsumer_group
and moved that parameter fromreceive
method to the constructor ofEventHubConsumerClient
. - Renamed parameter
initial_event_position
tostarting_position
on thereceive
method ofEventHubConsumerClient
. - Renamed parameter
event_hub_path
toeventhub_name
in constructor andfrom_connection_string
method of the client object. EventHubProducerClient.send
has been renamed tosend_batch
which will only acceptEventDataBatch
object as input.EventHubProducerClient.create_batch
now also takes thepartition_id
andpartition_key
as optional parameters (which are no longer specified at send).
- Renamed method
- Renamed module
PartitionManager
toCheckpointStore
. - Receive event callback parameter has been renamed to
on_event
and now operates on a single event rather than a list of events. - Removed class
EventPostition
.- The
starting_position
parameter of thereceive
method accepts offset(str
), sequence number(int
), datetime (datetime.datetime
) ordict
of these types. - The
starting_position_inclusive
parameter of thereceive
method acceptsbool
ordict
indicating whether the given event position is inclusive or not.
- The
PartitionContext
no longer has attributeowner_id
.PartitionContext
now has attributelast_enqueued_event_properties
which is populated iftrack_last_enqueued_event_properties
is set toTrue
in thereceive
method.
** New features **
- Added new parameter
idle_timeout
in construct andfrom_connection_string
toEventHubConsumerClient
andEventHubProducerClient
after which the underlying connection will close if there is no further activity.