EventHub output binding: set partitionKey for output event
See original GitHub issueContext
The EventHub SDK allows to specify the partitionKey for a batch of events, as shown here:
batch = hub_client.create_batch(partition_key=mykey)
batch.add(EventData(json.dumps({ ... })))
hub_client.send_batch(batch)
Issue
The documentation for Azure Functions shows how to use a function return value to send an event to EventHub, using the following configuration and function:
{
"type": "eventHub",
"name": "$return",
"eventHubName": "myeventhub",
"connection": "MyEventHubSendAppSetting",
"direction": "out"
}
import logging
import azure.functions as func
def main(timer: func.TimerRequest) -> str:
return 'Hello world'
How can we modify the example above to set the partitionKey on the output message ?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Set partitionKey for the event hub output binding
I have a javascript function app, which defines output binding pointing to an Event Hub as described here. I'm sending multiple messages at ......
Read more >Azure Event Hubs output binding for Azure Functions
Use the Event Hubs output binding to write events to an event stream. You must have send permission to an event hub to...
Read more >Eventhub triggered Azure function: Replays and Retries
Since all 10 events are sent to partition 0 as a batch and batchCheckpointFrequency is set to 2, azure function will mark the...
Read more >Processing 100000 Events Per Second on Azure Functions
Functions picks up messages from the ingestion event hub, ... outputWeatherData, IAsyncCollector<EventData> outputSeismicData, ...
Read more >Building an event streaming app with Azure Functions, Event ...
For this module, I've created three outputs: One for the name of our ... We set this up for our Event Hub Namespace...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d also be interested in utilizing this functionality!
Any update on this?