Skip to content

Commit

Permalink
[Event Hubs] Add links in changelog (#4127)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Jun 28, 2019
1 parent 6780a86 commit c1240b8
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions sdk/eventhub/event-hubs/changelog.md
Expand Up @@ -6,35 +6,41 @@ idiomatic to the Javascript ecosystem. The reasons for most of the changes in th
For more information, please visit https://aka.ms/azure-sdk-preview1-js

#### Breaking changes
- Creating an instance of `EventHubClient` is now done using construtor overloads instead of static helpers.
- Creating an instance of [EventHubClient](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html)
is now done using construtor overloads instead of static helpers.
- If you previously used the `createFromTokenProvider` static helper to provide your own custom token provider,
you will now need to update the provider to follow the new `TokenCredential` interface instead.
- If you previously used the `@azure/ms-rest-nodeauth` library to provide AAD credentials, you will now need to use the new
`@azure/identity` library instead.
- The send methods are moved from the `EventHubClient` class to the new `EventHubProducer` class.
- Use the `createProducer()` function on the `EventHubClient` to create an instance of a `EventHubProducer`. A producer can be bound to a partition at the time of creation such that all events sent from it land in the given partition.
[@azure/identity](https://www.npmjs.com/package/@azure/identity) library instead.
- The send methods are moved from the `EventHubClient` class to the new [EventHubProducer](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubproducer.html) class.
- Use the [createProducer()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html#createproducer)
function on the `EventHubClient` to create an instance of a `EventHubProducer`.
- Each producer represents a dedicated AMQP sender link to Azure Event Hubs.
- The `EventData` type used for the data being sent only supports a `body` for the content being sent and a
- The [EventData](https://azure.github.io/azure-sdk-for-js/event-hubs/interfaces/eventdata.html) type used for
the data being sent only supports a `body` for the content being sent and a
`properties` bag to hold any custom metadata you want to send. The properties corresponding to a received event are
removed from this type and a separate type `ReceivedEventData` is used for received events.
- The receive methods are moved from the `EventHubClient` class to the new `EventHubConsumer` class.
- Use the `createConsumer()` function on the `EventHubClient` to create an instance of a `EventHubConsumer`.
removed from this type and a separate type [ReceivedEventData](https://azure.github.io/azure-sdk-for-js/event-hubs/interfaces/receivedeventdata.html)
is used for received events.
- The receive methods are moved from the `EventHubClient` class to the new [EventHubConsumer](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubconsumer.html) class.
- Use the [createConsumer()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html#createconsumer)
function on the `EventHubClient` to create an instance of a `EventHubConsumer`.
- Each consumer represents a dedicated AMQP receiver link to Azure Event Hubs based
on the flavor of receive function being used i.e `receiveBatch()` that receives events in a batch vs `receive()` that provides
a streaming receiver.
- The static methods `EventPosition.fromStart()` and `EventPosition.fromEnd()` are renamed to `EventPosition.earliest()` and `EventPosition.latest()` respectively.
- Inspecting Event Hub
- The methods `getHubRuntimeInformation()` and `getPartitionInformation()` on the `EventHubClient` are renamed to
`getProperties()` and `getPartitionProperties()` respectively. Please refer to the return types of these functions to ensure
you are using the right property names.
[getProperties()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html#getproperties) and
[getPartitionProperties()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubclient.html#getpartitionproperties)
respectively. Please refer to the return types of these functions to ensure you are using the right property names.

#### New features
- You can now configure retry options that are used to govern retry attempts when a retryable error occurs. These can be
set when creating the `EventHubClient`, `EventHubProducer` and `EventHubConsumer`
- You can now pass an abort signal to any of the async operations. This signal can be used to cancel such operations. Use
the package `@azure/abort-controller` to create such abort signals.
the package [@azure/abort-controller](https://www.npmjs.com/package/@azure/abort-controller) to create such abort signals.
- An async iterator is now available to receive events after you create an instance of `EventHubConsumer`. Use the function
`getEventIterator()` on the consumer to get a `AsyncIterableIterator` which you can then use in a for loop or use it's `next()` function to receive events.
[getEventIterator()](https://azure.github.io/azure-sdk-for-js/event-hubs/classes/eventhubconsumer.html#geteventiterator) on the consumer to get a `AsyncIterableIterator` which you can then use in a loop or use it's `next()` function to receive events.

#### Next Steps

Expand Down

0 comments on commit c1240b8

Please sign in to comment.