Skip to content

Commit 110f596

Browse files
authored
Merge pull request #101007 from spelluru/JSandPython
Only Python and JS
2 parents 2cf5141 + bc3d929 commit 110f596

17 files changed

+601
-198
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12565,6 +12565,11 @@
1256512565
"redirect_url": "/azure/event-hubs/event-hubs-node-get-started-send",
1256612566
"redirect_document_id": false
1256712567
},
12568+
{
12569+
"source_path": "articles/event-hubs/event-hubs-python.md",
12570+
"redirect_url": "/azure/event-hubs/event-hubs-python-get-started-send",
12571+
"redirect_document_id": false
12572+
},
1256812573
{
1256912574
"source_path": "articles/event-hubs/event-hubs-python-get-started-receive.md",
1257012575
"redirect_url": "/azure/event-hubs/event-hubs-python-get-started-send",

articles/event-hubs/TOC.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
- name: Java
3232
href: event-hubs-java-get-started-send.md
3333
- name: Python
34-
href: event-hubs-python-get-started-send.md
34+
href: get-started-python-send-v2.md
3535
- name: Node.js
36-
href: event-hubs-node-get-started-send.md
36+
href: get-started-node-send-v2.md
3737
- name: Go
3838
href: event-hubs-go-get-started-send.md
3939
- name: C (send only)
@@ -49,7 +49,7 @@
4949
- name: Use a Resource Manager template to enable Event Hubs Capture
5050
href: event-hubs-resource-manager-namespace-event-hub-enable-capture.md
5151
- name: Capture Event Hubs data using Python
52-
href: event-hubs-capture-python.md
52+
href: get-started-capture-python-v2.md
5353
- name: Stream into Event Hubs for Apache Kafka
5454
href: event-hubs-quickstart-kafka-enabled-event-hubs.md
5555
- name: Create a dedicated cluster
@@ -114,10 +114,22 @@
114114
href: event-hubs-get-connection-string.md
115115
- name: Exchange events between applications using different protocols
116116
href: event-hubs-exchange-events-different-protocols.md
117-
- name: .NET programming guide
118-
href: event-hubs-programming-guide.md
119-
- name: Send, receive, and capture events using Python
120-
href: event-hubs-python.md
117+
- name: Programming guides
118+
items:
119+
- name: Python
120+
href: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub/README.md
121+
- name: JavaScript
122+
href: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/eventhubs/azure-messaging-eventhubs/README.md
123+
- name: .NET programming guide
124+
href: event-hubs-programming-guide.md
125+
- name: Read captured data using Python (legacy)
126+
href: event-hubs-capture-python.md
127+
- name: Send and receive events (legacy)
128+
items:
129+
- name: Python (legacy)
130+
href: event-hubs-python-get-started-send.md
131+
- name: Node.js (legacy)
132+
href: event-hubs-node-get-started-send.md
121133
- name: Process data
122134
items:
123135
- name: Process data using Azure Stream Analytics
@@ -193,7 +205,15 @@
193205
- name: Microsoft.Azure.Management.EventHub
194206
href: /dotnet/api/microsoft.azure.management.eventhub
195207
- name: Node.js
196-
href: /javascript/api/overview/azure/event-hub?view=azure-node-latest
208+
items:
209+
- name: Migrate from version 2 to version 5
210+
href: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/migrationguide.md
211+
- name: API reference
212+
href: /javascript/api/overview/azure/event-hub?view=azure-node-latest
213+
- name: Python
214+
items:
215+
- name: Migrate from version 1 to version 5
216+
href: https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub/migration_guide.md
197217
- name: REST
198218
href: /rest/api/eventhub
199219
- name: Resource Manager template

articles/event-hubs/event-hubs-capture-python.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.tgt_pltfrm: na
1414
ms.devlang: na
1515
ms.topic: quickstart
1616
ms.custom: seodec18
17-
ms.date: 11/05/2019
17+
ms.date: 01/08/2020
1818
ms.author: shvija
1919

2020
---
@@ -25,6 +25,9 @@ Capture is a feature of Azure Event Hubs. You can use Capture to automatically d
2525

2626
This walkthrough uses the [Azure Python SDK](https://azure.microsoft.com/develop/python/) to demonstrate the Capture feature. The *sender.py* program sends simulated environmental telemetry to Event Hubs in JSON format. The event hub uses the Capture feature to write this data to Blob storage in batches. The *capturereader.py* app reads these blobs, creates an append file for each of your devices, and writes the data to *.csv* files on each device.
2727

28+
> [!IMPORTANT]
29+
> This quickstart uses version 1 of the Azure Event Hubs Python SDK. If you are new to Azure Event Hubs, use version 5 of the Python SDK. For a quickstart that uses version 5 of the Python SDK, see [this article](get-started-capture-python-v2.md). If you need to migrate existing code from version 1 to version 5, see the [migration guide](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub/migration_guide.md).
30+
2831
In this walkthrough, you:
2932

3033
> [!div class="checklist"]

articles/event-hubs/event-hubs-node-get-started-send.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ ms.service: event-hubs
99
ms.workload: core
1010
ms.topic: quickstart
1111
ms.custom: seodec18
12-
ms.date: 11/05/2019
12+
ms.date: 01/08/2020
1313
ms.author: spelluru
1414

15+
1516
---
1617

1718
# Quickstart: Send events to or receive events from Azure Event Hubs using Node.js
@@ -20,6 +21,9 @@ Azure Event Hubs is a Big Data streaming platform and event ingestion service th
2021

2122
This tutorial describes how to create Node.js applications to send events to or receive events from an event hub.
2223

24+
> [!IMPORTANT]
25+
> This quickstart uses version 2 of the Azure Event Hubs Java Script SDK. If you are new to Azure Event Hubs, use version 5 of the Java Script SDK. For a quickstart that uses version 5 of the Java Script SDK, see [this article](get-started-node-send-v2.md). If you need to migrate existing code from version 2 to version 5, see the [migration guide](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/eventhub/event-hubs/migrationguide.md).
26+
2327
> [!NOTE]
2428
> You can download this quickstart as a sample from the [GitHub](https://github.com/Azure/azure-event-hubs-node/tree/master/client), replace `EventHubConnectionString` and `EventHubName` strings with your event hub values, and run it. Alternatively, you can follow the steps in this tutorial to create your own.
2529
@@ -34,11 +38,11 @@ To complete this tutorial, you need the following prerequisites:
3438

3539

3640
### Install npm package
37-
To install the [npm package for Event Hubs](https://www.npmjs.com/package/@azure/event-hubs), open a command prompt that has `npm` in its path, change the directory
41+
To install the [npm package for Event Hubs](https://www.npmjs.com/package/@azure/event-hubs@2), open a command prompt that has `npm` in its path, change the directory
3842
to the folder where you want to have your samples and then run this command
3943

4044
```shell
41-
npm install @azure/event-hubs
45+
npm install @azure/event-hubs@2
4246
```
4347

4448
To install the [npm package for Event Processor Host](https://www.npmjs.com/package/@azure/event-processor-host), run the below command instead
@@ -55,7 +59,7 @@ This section shows you how to create a Node.js application that sends events to
5559
2. Create a file called `send.js` and paste the below code into it. Get the connection string for the event hub namespace by following instructions from the article: [Get connection string](event-hubs-get-connection-string.md#get-connection-string-from-the-portal).
5660

5761
```javascript
58-
const { EventHubClient } = require("@azure/event-hubs");
62+
const { EventHubClient } = require("@azure/event-hubs@2");
5963

6064
// Connection string - primary key of the Event Hubs namespace.
6165
// For example: Endpoint=sb://myeventhubns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -94,7 +98,7 @@ of the default consumer group in an event hub.
9498
1. Open your favorite editor, such as [Visual Studio Code](https://code.visualstudio.com).
9599
2. Create a file called `receive.js` and paste the below code into it.
96100
```javascript
97-
const { EventHubClient, delay } = require("@azure/event-hubs");
101+
const { EventHubClient, delay } = require("@azure/event-hubs@2");
98102
99103
// Connection string - primary key of the Event Hubs namespace.
100104
// For example: Endpoint=sb://myeventhubns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

articles/event-hubs/event-hubs-python-get-started-send.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: femila
88
ms.service: event-hubs
99
ms.workload: core
1010
ms.topic: quickstart
11-
ms.date: 11/05/2019
11+
ms.date: 01/08/2020
1212
ms.author: shvija
1313

1414
---
@@ -19,6 +19,10 @@ Azure Event Hubs is a Big Data streaming platform and event ingestion service th
1919

2020
This quickstart shows how to create Python applications that send events to and receive events from an event hub.
2121

22+
> [!IMPORTANT]
23+
> This quickstart uses version 1 of the Azure Event Hubs Python SDK. If you are new to Azure Event Hubs, use version 5 of the Python SDK. For a quickstart that uses version 5 of the Python SDK, see [this article](get-started-python-send-v2.md). To migrate existing code from version 1 to version 5, see the [migration guide](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub/migration_guide.md).
24+
25+
2226
> [!NOTE]
2327
> Instead of working through the quickstart, you can download and run the [sample apps](https://github.com/Azure/azure-event-hubs-python/tree/master/examples) from GitHub. Replace the `EventHubConnectionString` and `EventHubName` strings with your event hub values.
2428

articles/event-hubs/event-hubs-python.md

Lines changed: 0 additions & 165 deletions
This file was deleted.

0 commit comments

Comments
 (0)