Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump gson from 2.8.5 to 2.8.9 in /samples/Java/Basic/SimpleSend #493

Open
wants to merge 88 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
9c355e9
draft
serkantkaraca Jun 27, 2019
037168f
Adding control plane + data plane EH sample
serkantkaraca Jun 28, 2019
37cf05a
SDK ref fixes for EH RBAC sample
serkantkaraca Jun 28, 2019
2dba515
Merge branch 'master' of https://github.com/Azure/azure-event-hubs in…
serkantkaraca Jul 1, 2019
118133b
Updates for 3.0.0 RBAC release
JamesBirdsall Jul 1, 2019
27c213b
Adding RBAC custom role sample
serkantkaraca Jul 2, 2019
51587c8
Remove unintented files
serkantkaraca Jul 2, 2019
10ec29a
Reverting unintended changes
serkantkaraca Jul 2, 2019
c030b6d
readme changes
serkantkaraca Jul 2, 2019
1306652
minor changes
serkantkaraca Jul 2, 2019
eda4dbd
Refactoring token acquisition
serkantkaraca Jul 2, 2019
4a87ed4
Update readme.md
serkantkaraca Jul 2, 2019
3337741
Update readme.md
serkantkaraca Jul 2, 2019
d47a55f
Merge pull request #446 from Azure/serkar.AddCustomRbacEhSample
serkantkaraca Jul 2, 2019
8caf262
Adding sender sample for rbac
ShubhaVijayasarathy Jul 3, 2019
edb6409
Merge pull request #445 from Azure/RBACupdates
ShubhaVijayasarathy Jul 17, 2019
9940943
Merge branch 'master' of https://github.com/Azure/azure-event-hubs in…
serkantkaraca Jul 18, 2019
23d3eaa
Moving Managed Identity sample to .NET Standard SDK
serkantkaraca Jul 18, 2019
566ef0c
Remove unintended SampleSender changes
serkantkaraca Jul 18, 2019
12583b9
Revert "Updates for Java client 3.0.0 RBAC release" (#448)
ShubhaVijayasarathy Jul 22, 2019
f335055
Merge pull request #449 from Azure/MsiSampleChanges
serkantkaraca Jul 22, 2019
ff85c7c
Move EH SDK to 4.0.0
serkantkaraca Jul 22, 2019
582fc0b
Merge pull request #451 from Azure/FixRbcSample2
serkantkaraca Jul 22, 2019
bb7a402
Remove CxCache dependency in ReliableSender sample
serkantkaraca Jul 22, 2019
526c56c
-
serkantkaraca Jul 22, 2019
a5895c7
Merge pull request #452 from Azure/RemoveCxCacheReferences
serkantkaraca Jul 22, 2019
225db71
Reorging the folder structure
ShubhaVijayasarathy Jul 22, 2019
d548f8f
adding samples to Messaging.SErviceBus
ShubhaVijayasarathy Jul 22, 2019
a35a76f
Update App.config
serkantkaraca Jul 24, 2019
5cb25d3
Moving SFProcessor sample into SDK folder
serkantkaraca Jul 25, 2019
a9876ef
Merge pull request #453 from Azure/reorg_samples
serkantkaraca Jul 25, 2019
d096ca2
Update Java samples for 3.0.0 client (#455)
JamesBirdsall Aug 29, 2019
12b87e6
Consolidate all Java RBAC sample work (#456)
JamesBirdsall Aug 29, 2019
cbc412e
updated to use the 5.0.0 SDK (#459)
spelluru Oct 23, 2019
790471f
Update samples for client 3.0.2 (#457)
JamesBirdsall Oct 23, 2019
8cf2471
updated samples used by tutorials to use the new package
spelluru Oct 30, 2019
17f6ceb
updated Anomaly Detector and Wind Turbine Data Generator samples for …
spelluru Nov 5, 2019
a4354c1
updated Anomaly Detector and WindTurbineDataGenerator samples for Pre…
spelluru Dec 5, 2019
2be764e
updated for Preview 6
spelluru Dec 6, 2019
78ec550
updated based on feedback from Serkant and Jesse
spelluru Jan 9, 2020
000b20a
minor update to UI - fully qualified name
spelluru Jan 9, 2020
40fa580
added using statements
spelluru Jan 9, 2020
284fd90
Merge pull request #463 from spelluru/newpackagesamples1029
serkantkaraca Jan 13, 2020
f4f50e8
fixed the receive code
spelluru Jan 15, 2020
f65204b
Merge pull request #464 from spelluru/fixmsi0115
spelluru Jan 16, 2020
72fc2bb
Updated samples to use the latest .NET package
spelluru Jan 30, 2020
1b66691
Merge pull request #466 from spelluru/ehubsamples0130
spelluru Feb 12, 2020
3527fe9
Add async send sample (#468)
JamesBirdsall Apr 22, 2020
7ed366d
updated the readme to point to new samples. Cleaned up too.
spelluru Apr 30, 2020
5a42971
Merge pull request #469 from spelluru/sdklinks0430
spelluru May 6, 2020
5a16c14
Updated to use Functions runtime version 3 (latest)
spelluru Jun 9, 2020
5acf9e8
removed publish profile
spelluru Jun 9, 2020
3af21a2
Merge pull request #471 from spelluru/egridintegrationsample0608
spelluru Jun 9, 2020
e9e01dd
updated to use Azure.Messaging.EventHubs 5.2 - latest stable version
spelluru Dec 8, 2020
d6bf8b1
Merge pull request #472 from spelluru/ehubegridintegration1207
serkantkaraca Dec 8, 2020
da5dd91
modified readmes to point to Track 2 content; moved files to right fo…
Mar 17, 2021
aa20765
addressed review feedback
Mar 23, 2021
8576c5e
Simplify readme for RBAC
ramya-rao-a Apr 2, 2021
719324b
Re-order steps for custom role sample for clarity
ramya-rao-a Apr 2, 2021
de8fe23
Consolidate intro and note, use quick start links
ramya-rao-a Apr 2, 2021
ca68875
Merge pull request #475 from ramya-rao-a/lily-patch
lilyjma Apr 5, 2021
f471963
Merge pull request #474 from Azure/lily-patch
lilyjma Apr 6, 2021
97caf51
moved samples to approach directories
Apr 7, 2021
1362353
Remove duplicate sample for EventHubsCaptureEventGridDemo
ramya-rao-a Apr 9, 2021
6d8fc54
Merge pull request #477 from ramya-rao-a/remove-dupe
spelluru Apr 12, 2021
10df2c2
Merge pull request #476 from Azure/lily-patch2
spelluru Apr 12, 2021
809eb4c
Clean up of the EventHubsCaptureEventGridDemo sample in the azure-eve…
zedy-wj Apr 15, 2021
71ed5ea
Add pointers to new packages in readme files at the root and for .Net…
ramya-rao-a Apr 16, 2021
d961416
Updating to use EventHubsCaptureAvroBlobUri to create the BlobClient …
zedy-wj Apr 19, 2021
4cadf09
Updating the Reference
zedy-wj Apr 21, 2021
bffa22a
Merge pull request #479 from zedy-wj/CleanupEventhub
spelluru Apr 23, 2021
5c333eb
Sample using Event Hub Log4j Appender (#482)
sagar027 Sep 2, 2021
15b99a5
Update readme with pointers to newer samples (#481)
ramya-rao-a Sep 22, 2021
3cb13d5
Fix incorrect redirection (#467)
madushajg Sep 22, 2021
0b193ff
fix code comment (#485)
v-thpra Mar 7, 2022
df61522
Addition of Schema to Schema groups via Powershell
Saglodha Apr 7, 2022
af22936
Add schema to schema groups via Bash
Saglodha Apr 7, 2022
ab93acf
Added PS variables
Saglodha Apr 28, 2022
d910592
Merge pull request #488 from Saglodha/master
serkantkaraca Apr 29, 2022
f8c2795
Updating the sample to use latest packages
spelluru May 6, 2022
fe3a7bc
ARM template
spelluru May 6, 2022
6c396fc
Delete samples/e2e/EventHubsCaptureEventGridDemo/DWDumper directory
spelluru May 6, 2022
2570003
Delete samples/e2e/EventHubsCaptureEventGridDemo/media directory
spelluru May 6, 2022
2f0f8d7
Delete samples/e2e/EventHubsCaptureEventGridDemo/scripts directory
spelluru May 6, 2022
3702362
Merge pull request #1 from spelluru/spelluru-patch-1
spelluru May 6, 2022
34706f7
Duplicate of Data.cs
spelluru May 6, 2022
5723a0c
Merge pull request #490 from spelluru/master
spelluru May 13, 2022
a90fb33
Bump gson from 2.8.5 to 2.8.9 in /samples/Java/Basic/SimpleSend
dependabot[bot] May 20, 2022
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
53 changes: 38 additions & 15 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="event-hubs.png" alt="Microsoft Azure Event Hubs" width="100"/>
</p>

<h1 align="center">Microsoft Azure Event Hubs
<h1 align="center">Azure Event Hubs samples
<p align="center">
<a href="#star-our-repo">
<img src="https://img.shields.io/github/stars/azure/azure-event-hubs.svg?style=social&label=Stars"
Expand All @@ -12,23 +12,46 @@
alt="follow on Twitter"></a>
</p></h1>

We're happy to host our client SDKs and integrations on GitHub as free, open-source projects. We currently support:
This repository contains samples for Azure Event Hubs.

* [Event Hubs for Apache Kafka](https://github.com/Azure/azure-event-hubs-for-kafka)
* [.NET](https://github.com/azure/azure-event-hubs-dotnet)
* [Java](https://github.com/azure/azure-event-hubs-java)
* [C](https://github.com/azure/azure-event-hubs-c)
* [Node.js](https://github.com/azure/azure-event-hubs-node)
* [Python](https://github.com/azure/azure-event-hubs-python)
* [Go](https://github.com/azure/azure-event-hubs-go)
* [Apache Spark connector](https://github.com/Azure/azure-event-hubs-spark)
## Client SDK samples

If you have any feedback, questions, or comments, go to the respective repo and file an issue. **Your involvement is welcome and encouraged!**
> **Note:** This repository holds samples for the legacy libraries for Azure Event Hubs for .NET and Java developers. We highly recommend you to upgrade to the newer packages.

.NET legacy packages

- Microsoft.Azure.EventHubs (**legacy**)
- Microsoft.Azure.EventHubs.Processor (**legacy**)
- WindowsAzure.ServiceBus (**legacy**)

Java legacy packages

- com.microsoft.azure:azure-eventhubs (**legacy**)
- com.microsoft.azure:azure-eventhubs-eph (**legacy**)

Samples for **latest** .NET packages for Azure Event Hubs

## What is Event Hubs?
- [Azure.Messaging.EventHubs](https://docs.microsoft.com/samples/azure/azure-sdk-for-net/azuremessagingeventhubs-samples/)
- [Azure.Messaging.EventHubs.Processor](https://docs.microsoft.com/samples/azure/azure-sdk-for-net/azuremessagingeventhubsprocessor-samples/)

Samples for **latest** Java packages for Azure Event Hubs

- [com.azure:azure-messaging-eventhubs](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/eventhubs/azure-messaging-eventhubs/src/samples)
- [com.azure:azure-messaging-eventhubs-checkpointstore-blob](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/src/samples)

You can find samples for other languages and frameworks in the following repositories:
- [JavaScript](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/eventhub/event-hubs/samples)
- [Python](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples)
- [C](https://github.com/azure/azure-event-hubs-c)
- [Go](https://github.com/azure/azure-event-hubs-go)
- [Apache Spark connector](https://github.com/Azure/azure-event-hubs-spark)
- [Event Hubs for Apache Kafka](https://github.com/Azure/azure-event-hubs-for-kafka)

If you have any feedback, questions, or comments, go to the respective repo and file an issue. **Your involvement is welcome and encouraged!**

Azure Event Hubs is a hyper-scale data ingestion service, fully-managed by Microsoft, that enables you to collect, store and process trillions of events from websites, apps, IoT devices, and any stream of data. To learn more, please visit our [marketing page](https://azure.microsoft.com/services/event-hubs/).
## Management SDK samples
This repository also contains [management samples](https://github.com/Azure/azure-event-hubs/tree/master/samples/Management) that use the .NET management SDK, PowerShell, and CLI.

## Azure Event Hubs for Apache Kafka

Event Hubs now provides a Kafka endpoint that can be used by your existing Kafka-based applications as an alternative to running your own Kafka cluster. To learn more, check out the new [Azure Event Hubs for Apache Kafka](https://github.com/Azure/azure-event-hubs-for-kafka) repo!
## See also
To learn about Event Hubs, see our [Event Hubs documentation](https://docs.microsoft.com/en-us/azure/event-hubs/).
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Messaging.EventHubs" Version="5.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Producer
{
using System;
using System.Text;
using System.Threading.Tasks;
using Azure.Messaging.EventHubs;
using Azure.Messaging.EventHubs.Producer;
using System.Collections.Generic;
using System.IO;

public class Program
{
private const string EventHubNamespaceConnectionString = "<EVENT HUBS NAMESPACE CONNECTION STRING>";
private const string EventHubName = "<EVENT HUB NAME>";
private const string TransactionsDumpFile = "mocktransactions.csv";

private static EventHubProducerClient producerClient;

static async Task Main()
{
// create an Event Hubs Producer client using the namespace connection string and the event hub name
producerClient = new EventHubProducerClient(EventHubNamespaceConnectionString, EventHubName);

// send messages to the event hub
await SendMessagesToEventHubAsync(1000);

await producerClient.CloseAsync();

Console.WriteLine("Press [enter] to exit.");
Console.ReadLine();
}

// Creates an Event Hub client and sends messages to the event hub.
private static async Task SendMessagesToEventHubAsync(int numMessagesToSend)
{
var eg = new EventGenerator();

IEnumerable<Transaction> transactions = eg.GenerateEvents(numMessagesToSend);

if (File.Exists(TransactionsDumpFile))
{
// exceptions not handled for brevity
File.Delete(TransactionsDumpFile);
}

await File.AppendAllTextAsync(
TransactionsDumpFile,
$"CreditCardId,Timestamp,Location,Amount,Type{Environment.NewLine}");

int numSuccessfulMessages = 0;
try
{
// create a batch using the producer client
using (EventDataBatch eventBatch = await producerClient.CreateBatchAsync())
{
foreach (var t in transactions)
{
// we don't send the transaction type as part of the message.
// that is up to the downstream analytics to figure out!
// we just pretty print them here so they can easily be compared with the downstream
// analytics results.
var message = t.Data.ToJson();

if (t.Type == TransactionType.Suspect)
{
var fc = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Yellow;

Console.WriteLine($"Suspect transaction: {message}");

Console.ForegroundColor = fc; // reset to original
}
else
{
Console.WriteLine($"Regular transaction: {message}");
}

var line = $"{t.Data.CreditCardId},{t.Data.Timestamp.ToString("o")},{t.Data.Location},{t.Data.Amount},{t.Type}{Environment.NewLine}";

File.AppendAllText(TransactionsDumpFile, line);

// add the message to the batch
eventBatch.TryAdd(new EventData(Encoding.UTF8.GetBytes(message)));
numSuccessfulMessages++;
}
// send the batch of messages to the event hub using the producer object
await producerClient.SendAsync(eventBatch);
await Task.Delay(10);
}
}
catch (Exception ex)
{
Console.WriteLine($"{Environment.NewLine}Exception: {ex.Message}");
}
Console.WriteLine();
Console.WriteLine($"{numSuccessfulMessages} messages sent successfully.");
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# Visualize data anomalies in real-time events sent to Azure Event Hubs
In this sample, you run an application that creates and sends credit card transactions to an event hub. Then you read the stream of data in real-time with Azure Stream Analytics, which separates the valid transactions from the invalid transactions, and then use Power BI to visually identify the transactions that are tagged as invalid.

For detailed information and steps for using this sample, see [this article](https://docs.microsoft.com/azure/event-hubs/event-hubs-tutorial-visualize-anomalies).
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%@ Application Codebehind="Global.asax.cs" Inherits="ManagedIdentityWebApp.Global" Language="C#" %>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Web.Security;
using System.Web.SessionState;

namespace EventHubsMSIDemoWebApp
namespace ManagedIdentityWebApp
{
public class Global : System.Web.HttpApplication
{
Expand Down
Loading