Event Hubs:

Azure Event Hubs is a highly scalable publish-subscribe service that can ingest millions of events per second
and stream them into multiple applications. This lets you process and analyze the massive amounts of
data produced by your connected devices and applications.

https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features

Event Hubs frequently asked questions

Frequently asked questions – Azure Event Hubs | Microsoft Docs

Quickstart: Create an event hub using Azure portal

Azure Quickstart – Create an event hub using the Azure portal – Azure Event Hubs | Microsoft Docs

Tiers and there is also premium

standard: 20,1000, ie, ret 7, schema reg, storage account capture

Create an Event Hubs namespace

testit4eventhub

Pricing for each Throughput Unit per month

Capacity allocations throughput units (TUs) or processing units (PUs)) are billed at the namespace level.

Create an event hub

Create an event hub within the namespace

Connection string for a specific event hub in a namespace

Get connection string – Azure Event Hubs – Azure Event Hubs | Microsoft Docs

Test send

Send or receive events from Azure Event Hubs using Python (latest) – Azure Event Hubs | Microsoft Docs

send.py

Well we sendt some requests, but there seems to be a issue…, Authentication Put-Token failed. Retries exhausted in between:

# WE ARE NOW USING THE testit4hub (testit4eventhub/testit4hub) | Shared access policies ->AdminPolicy->Connection string–primary key
Authentication Put-Token failed. Retries exhausted.
Authentication Put-Token failed. Retries exhausted.
Authentication Put-Token failed. Retries exhausted.
Authentication Put-Token failed. Retries exhausted.

[…]
azure.eventhub.exceptions.AuthenticationError: The messaging entity xxxx could not be found
TrackingId: xxxxxx Timestamp:2022-01-29T15:12:00
CBS Token authentication failed.
Status code: 404
Description: The messaging entity xxxxx could not be found, xxx Timestamp:2022-01-29T15:12:00

hm….is this because of the rg in West Europe?

Try Norway Region, rm testit4eventhub and re-create it in Norway

Now the Resourcegroup, eventhubnamespace and eventhub is in Norway East and we create a policy in the SAS eventhub named MyAdminPolicyNorway.

What is the timestamp now? The time in Norway is 16:30

Authentication Put-Token failed. Retries exhausted.
Authentication Put-Token failed. Retries exhausted.
Authentication Put-Token failed. Retries exhausted.
Authentication Put-Token failed. Retries exhausted.
Timestamp:2022-01-29T15:29:50

MY BAD, MY BAD NOTE!!!

The Python code was wrong:

Lets look at the result after sending 9 msg:

Python:

PS C:\giti2021\azure-arm-104\8_extra_tutorials\python_sdk_eventhub> python .\send.py
Messages sent to event hub success

Portal for testit4eventhub/testit4hub should be 9 incoming success and no outgoing yet

Cool, let rm the rg testit4 ro rm all resources we created.

code for send

azure-arm-104/8_extra_tutorials/python_sdk_eventhub at master · spawnmarvel/azure-arm-104 (github.com)

TODO:

View msg

Where is Azure Event Hub messages stored? – Stack Overflow

You don’t have direct access to the transient storage used for EventHub messages, but you could write a consumer that reads from the EventHub continuously and persist the messages

Capture msg in storage account TDB

Receive events TBD

Create an event hub (within the namespace)

Partition count setting allows you to parallelize consumption across many consumers
Message retention setting specifies how long the Event Hubs service keeps data

(Capture on, enable auto delivery to blob or lake, no admin cost for it.)

Container

testit4container