Open MikDal002 opened 3 years ago
I made a step ahead. After looking at Event Hub example and with some deduction i finished with:
ws_io_config.resource_name=/$servicebus/websocket;
,sb://" SB_HOST "/" SB_QUEUE_NAME "/"
With this, I successfully putted a message to the service bus. But I came across on another barrier – I can't receive any message because of the error uamqp/src/link.c Func:link_frame_received Line:333 Cannot get initial delivery count
.
Hello, I am looking for a way to connect to the service bus via web sockets. I wasn't able to make qpid-proton-c working for me. I found that azure-iot-c works over WS with IoT Hub, which brought me here. Unfortunately, I can't found connection parameters that I should provide to the "websocket_example" example. Of course, I filled
IOT_HUB_HOST
with"dev-myservicebusname.servicebus.windows.net"
, intoIOT_HUB_DEVICE_NAME
i wrote SharedAccessKeyName from Service Bus, intoIOT_HUB_DEVICE_KEY
.I replaced authorization method to avoid using certificates:
At this moment I completely don't know what I should write in place of
ws_io_config.resource_name = "/$iothub/websocket";
,STRING_concat(scope_string, IOT_HUB_HOST "/devices/" IOT_HUB_DEVICE_NAME);
(void)cbs_put_token_async(cbs, "servicebus.windows.net:sastoken", IOT_HUB_HOST "/devices/" IOT_HUB_DEVICE_NAME, STRING_c_str(sas_token), on_cbs_put_token_complete, cbs);
Errors I receive:
I tried many different combinations of:
IOT_HUB_HOST
and queue name but with no luck. Additionally, I completely don't know where I could find any clue about useful endpoints.