Comments (5)
Hi @TreesaChandy,
Sorry for the delay.
Short answer is: it is not supported out of the box.
Long answer:
Currently EH client for C does not have the config support to do WebSockets connections.
The underlying uamqp library (https://github.com/Azure/azure-uamqp-c) does have that support and for example the IoTHub C SDK client which uses the same infrastructure does support WebSockets. A simple sample of uamqp connecting with WS is here: https://github.com/Azure/azure-uamqp-c/tree/master/samples/websockets_sample.
But probably that's of little use for you as I understand you'd like the C EH client to be configurable to use WebSockets.
This would be a new feature to be added to the EH C SDK. Is it a big feature? Probably not, but here is what would need to happen:
- Add a transport mode argument to the _Create (EventHubClient_LL_CreateFromConnectionString) to specify AMQP or AMQP_WS as transport.
- Add tests and code for creating a WS_IO instead of the TLS_IO in the eventhub client code
IoTHub client (https://github.com/Azure/azure-iot-sdk-c) and EH SDK for C are VERY much similar, so there is prior art on doing this.
Unfortunately I do not have the bandwidth to add this feature at the moment. One option would be to PR it yourself if you feel comfortable with adding it.
HTH,
/Dan
from azure-event-hubs-c.
Can someone please reply to this since I need to know whether its possible or not?
from azure-event-hubs-c.
Thanks for the reply . Let me know whenever you implement this. One more question regarding AzureIOTHub sdk since I am using that to send messages from cloud to device. With the IOTHub I tried using mqtt over websockets and its losing connection to the proxy in between and getting a segfault. But without proxy its working fine.
I am using below line of code to enable proxy with MQTT over websockets
if ( IoTHubClient_SetOption(iotHubClientHandle , OPTION_HTTP_PROXY, &http_proxy_options) != IOTHUB_CLIENT_OK)
do you have any idea about this?
from azure-event-hubs-c.
The segfault in IoTHub client sounds like a clear bug to me. I am unsure in which layer the bug is (IoTHub client, uamqp, C shared), but I'd say since this is starting with the IoTHubClient API, can you open an issue in the IoTHub SDK for C repo?
https://github.com/Azure/azure-iot-sdk-c
Usually the IOTHub team will first look at this repo, if issues are open in the repos for the other layers it might take longer until they get to it.
Let me know how it goes!
/Dan
from azure-event-hubs-c.
Hi,
We exactly have the same problem (using eventHub with network with proxy).
Our releases shall work with proxy or not.
For the moment, we can't execute our tests on network with proxy configuration, which is prohibitive.
I agree with the proposed feature.
We need some visibility about when you can fix it and for which SDK release.
Thank you in advance
from azure-event-hubs-c.
Related Issues (20)
- All events are sent to the same partition HOT 3
- The instruction link in README.md file is invalid HOT 2
- Building with MinGW on windows HOT 5
- send example when using SAS tokens HOT 3
- Question on the compatibility with ubuntu 12.04 and RT Linux HOT 1
- receiver not working HOT 1
- client crashes during internal server errors on event hub
- EVENTHUBCLIENT_DATA_SIZE_EXCEEDED is not used in the SDK
- The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker' HOT 4
- Accessing system properties HOT 5
- Send request failing when trying to sending Avro serialized string
- Update azure-c-shared-utility of tag v0.11 HOT 1
- SAS Token 401 unauthorized error HOT 1
- network availability check HOT 3
- Missing build dependency file /configs/azure_iot_build_rules.cmake
- Azure uamqp library: Eventhub crashes on sending data over 1MB HOT 5
- Crash: V0.12.0:Eventhub_sample:send crashes on using sastoken connection. HOT 1
- How to Pass the message received to the user
- This repo is missing important files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-event-hubs-c.