Code Monkey home page Code Monkey logo

Comments (5)

dcristoloveanu avatar dcristoloveanu commented on July 17, 2024 1

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.

TreesaChandy avatar TreesaChandy commented on July 17, 2024

Can someone please reply to this since I need to know whether its possible or not?

from azure-event-hubs-c.

TreesaChandy avatar TreesaChandy commented on July 17, 2024

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.

dcristoloveanu avatar dcristoloveanu commented on July 17, 2024

@TreesaChandy

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.

Benjamin118 avatar Benjamin118 commented on July 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.