Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 38 additions & 6 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/eventhub/event-hubs/review/event-hubs.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class EventDataBatch {
constructor(context: ConnectionContext, maxSizeInBytes: number, partitionKey?: string);
readonly batchMessage: Buffer | undefined;
readonly partitionKey: string | undefined;
readonly size: number | undefined;
readonly size: number;
tryAdd(eventData: EventData): boolean;
}

Expand Down
23 changes: 22 additions & 1 deletion sdk/eventhub/event-processor-host/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## 2019-07-16 2.0.0
- Use the latest version of the dependency on [@azure/event-hubs](https://www.npmjs.com/package/@azure/event-hubs/v/2.1.1) that has the following bug fixes
- Added event handlers for `error` and `protocolError` events on the connection object to avoid the case of unhandled exceptions. This is related to the [bug 4136](https://github.com/Azure/azure-sdk-for-js/issues/4136)
- A network connection lost error is now treated as retryable error. A new error with name `ConnectionLostError`
is introduced for this scenario which you can see if you enable the [logs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventhub/event-processor-host#debug-logs).
- When recovering from an error that caused the underlying AMQP connection to get disconnected,
[rhea](https://github.com/amqp/rhea/issues/205) reconnects all the older AMQP links on the connection
resulting in the below 2 errors in the logs. We now clear rhea's internal map to avoid such reconnections.
We already have code in place to create new AMQP links to resume send/receive operations.
- InvalidOperationError: A link to connection '.....' $cbs node has already been opened.
- UnauthorizedError: Unauthorized access. 'Listen' claim(s) are required to perform this operation.

#### Breaking Changes
- If you have been using the `createFromAadTokenCredentials` function or the `createFromAadTokenCredentialsWithCustomCheckpointAndLeaseManager` function to create an instance of the
`EventProcessorHost`, you will now need to use the [@azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth)
library instead of [ms-rest-azure](https://www.npmjs.com/package/ms-rest-azure) library to create
the credentials that are needed by these functions.
- Typescript: Replace `import * from "ms-rest-azure";` with `import * from "@azure/ms-rest-nodeauth";`
- Javascript: Replace `require("ms-rest-azure")` with `require("@azure/ms-rest-nodeauth")`


## 2018-10-05 1.0.6
- Remove `@azure/amqp-common` and `rhea-promise` as dependencies, since we use very little from
those libraries and there is a risk of having two instances of rhea in the dependency chain which
Expand Down Expand Up @@ -61,4 +82,4 @@ partition management.
- This client library makes it easier to manage receivers for an EventHub.
- You can checkpoint the received data to an Azure Storage Blob. The processor does checkpointing
on your behalf at regular intervals. This makes it easy to start receiving events from the point you
left at a later time.
left at a later time.
6 changes: 3 additions & 3 deletions sdk/eventhub/event-processor-host/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@azure/event-processor-host",
"sdk-type": "client",
"version": "1.0.6",
"version": "2.0.0",
"description": "Azure Event Processor Host (Event Hubs) SDK for JS.",
"author": "Microsoft Corporation",
"license": "MIT",
Expand Down Expand Up @@ -58,11 +58,11 @@
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"dependencies": {
"@azure/event-hubs": "^1.0.6",
"@azure/event-hubs": "^2.1.1",
"async-lock": "^1.1.3",
"azure-storage": "^2.10.2",
"debug": "^3.1.0",
"ms-rest-azure": "^2.5.9",
"@azure/ms-rest-nodeauth": "^0.9.2",
"path-browserify": "^1.0.0",
"tslib": "^1.9.3",
"uuid": "^3.3.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
```ts

import { aadEventHubsAudience } from '@azure/event-hubs';
import { ApplicationTokenCredentials } from 'ms-rest-azure';
import { ApplicationTokenCredentials } from '@azure/ms-rest-nodeauth';
import AsyncLock from 'async-lock';
import { BlobService as BlobService_2 } from 'azure-storage';
import { ClientOptionsBase } from '@azure/event-hubs';
import { DataTransformer } from '@azure/event-hubs';
import { delay } from '@azure/event-hubs';
import { DeviceTokenCredentials } from 'ms-rest-azure';
import { DeviceTokenCredentials } from '@azure/ms-rest-nodeauth';
import { Dictionary } from '@azure/event-hubs';
import { EventData } from '@azure/event-hubs';
import { EventHubClient } from '@azure/event-hubs';
Expand All @@ -20,11 +20,11 @@ import { EventHubPartitionRuntimeInformation } from '@azure/event-hubs';
import { EventHubRuntimeInformation } from '@azure/event-hubs';
import { EventPosition } from '@azure/event-hubs';
import { MessagingError } from '@azure/event-hubs';
import { MSITokenCredentials } from 'ms-rest-azure';
import { MSITokenCredentials } from '@azure/ms-rest-nodeauth';
import { OnError } from '@azure/event-hubs';
import { ServiceResponse } from 'azure-storage';
import { TokenProvider } from '@azure/event-hubs';
import { UserTokenCredentials } from 'ms-rest-azure';
import { UserTokenCredentials } from '@azure/ms-rest-nodeauth';

export { aadEventHubsAudience }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
UserTokenCredentials,
DeviceTokenCredentials,
MSITokenCredentials
} from "ms-rest-azure";
} from "@azure/ms-rest-nodeauth";
import * as log from "./log";
import { LeaseManager } from "./leaseManager";
import { HostContext } from "./hostContext";
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhub/event-processor-host/src/util/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ export const leaseIdMismatchWithBlobOperation = "leaseidmismatchwithbloboperatio
export const defaultConsumerGroup = "$default";
export const packageInfo = {
name: "@azure/event-processor-host",
version: "1.0.5"
version: "2.0.0"
};
2 changes: 1 addition & 1 deletion sdk/eventhub/testhub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"node": ">=6.0.0"
},
"dependencies": {
"@azure/event-hubs": "^1.0.6",
"@azure/event-hubs": "^2.1.1",
"@azure/event-processor-host": "^1.0.6",
"@types/node": "^8.0.0",
"@types/uuid": "^3.4.3",
Expand Down