- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Created on 12-05-2016 11:49 PM - edited 08-17-2019 07:40 AM
To post random data to Azure Event hubs using HTTP, use a generate flowfile processor to first generate the random data. Connect this to an UpdateAttribute processor to add your SAS (Share Access Signature) as a new attribute called "Authorization" to the flow file's attributes. Finally use PostHTTP to submit the data to Event Hubs
Place the following processors on the pallet and set the run schedule of the generate flowfile processor to something reasonable like 10 seconds.
Configure Update Attribute, adding the "Authorized" property with a SAS token. For more information on creating a SAS token see https://community.hortonworks.com/articles/69823/creating-shared-access-signature-sas-for-posting-d....
Configure the PostHTTP to post the URL https://eventhub-nifi.servicebus.windows.net/hub-nifi/messages
Note: I set the content type to text/plain you should set this to suit your use case.
Only the truststore needs to be configured for this example as we only need to trust the server certificates presented to us by the Azure servers. For simplicity I use Java's default keystore. See this post for finding and configuring the SSL service to use this keystore. Otherwise you will need to import trust certificates into your keystore manually
Start all processors and verify successful submissions to the Event Hub Service in the Azure Portal
Background on the security mechanisms of Event Hubs
Background on Shard Access Signatures and how to generate them
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-sas-overview