'How can I use AMQP protocol over TLS when communicating with Azure Event Hubs

I am sending some data from a field gateway to an eventhub. I am concerned about security of the data sent. Righ now I am using the following code and data is going to eventhub. I wanted to know if data is being encryped behind the sceens by the sendSync method, or I need to add some code to encrypt the data before sending

EventData sendEvent = new EventData(payloadBytes);
EventHubClient ehClient = EventHubClient.createFromConnectionStringSync(connStr.toString());        
ehClient.sendSync(sendEvent); 

I am new to data security so any input would be a great help...Thankyou!!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source