azure / azure-event-hubs-c Goto Github PK
View Code? Open in Web Editor NEWC client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
License: Other
C client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
License: Other
i have created an event hub, sender and receiver. that code is working on ubuntu. but when i am cross compiling this for nvidia board with yocto setup (using for build custom image of linux) , the sender and receiver is not able to communicate with event hub.
Is any packages i have to add ??
Does Azure Eventhubs library support Amqp through websockets?If yes, how do we configure that?I need to find some information how to send the event hub messages through a proxy?
The content of file:
https://github.com/Azure/azure-event-hubs-c/blob/master/eventhub_client/samples/receive/readme.md
contains a instructions link 'Follow the instructions here.' which is points to https://github.com/Azure/azure-event-hubs/tree/master/c.
The link has been invalid for a long time.
Hi guys!
Building with MinGW on windows will fail with error, because of this code in azure-uamqp-c\CMakeLists.txt:
IF(WIN32)
#windows needs this define
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
# Make warning as error
add_definitions(/WX)
ELSE()
# Make warning as error
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
ENDIF(WIN32)
And this code in azure-c-shared-utility\CMakeLists.txt:
IF(WIN32)
#windows needs this define
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
IF(WINCE)
# Don't treat warning as errors for WEC 2013. WEC 2013 uses older compiler version
add_definitions(/WX-)
ELSE()
# Make warning as error
add_definitions(/WX)
ENDIF()
ELSE()
# Make warning as error
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
ENDIF(WIN32)
In both cases you add "/WX" flag to gcc call which is not defined there. I guess there should be one more check for MinGW compiler.
I have an EventHub with 16 partitions. With the C Client all events are going to the partition 14.
You can test it with any of the sample: send
, send_batch
and send_async
. All events are going to the same partition.
I've tested with the nodejs sender sample and it is working as expected. I've tested it with SBExplorer and a nodejs receiver.
I've written a simple nodejs receiver (based on the nodejs sample) to print the partitionId and the partitionKey. You can see the source here
This is what happens in the receiver when sending with the NodeJS Client:
partitionId: 14, partitionKey: 1
partitionId: 0, partitionKey: 2
partitionId: 3, partitionKey: 3
partitionId: 1, partitionKey: 4
partitionId: 8, partitionKey: 5
partitionId: 5, partitionKey: 6
partitionId: 14, partitionKey: 7
partitionId: 8, partitionKey: 8
partitionId: 4, partitionKey: 9
partitionId: 4, partitionKey: 10
partitionId: 15, partitionKey: 11
partitionId: 4, partitionKey: 12
partitionId: 7, partitionKey: 13
partitionId: 5, partitionKey: 14
partitionId: 5, partitionKey: 15
partitionId: 4, partitionKey: 16
With the NodeJS client it works as expected, it is using all partitions.
This is what happens in the receiver when sending with the C Client:
partitionId: 14, partitionKey: 1
partitionId: 14, partitionKey: 2
partitionId: 14, partitionKey: 3
partitionId: 14, partitionKey: 4
partitionId: 14, partitionKey: 5
partitionId: 14, partitionKey: 6
partitionId: 14, partitionKey: 7
partitionId: 14, partitionKey: 8
partitionId: 14, partitionKey: 9
partitionId: 14, partitionKey: 10
partitionId: 14, partitionKey: 11
partitionId: 14, partitionKey: 12
partitionId: 14, partitionKey: 13
partitionId: 14, partitionKey: 14
partitionId: 14, partitionKey: 15
partitionId: 14, partitionKey: 16
All events are going to the partition 14. Note that the partitionKey is the expected one, so the client is sending the correct partitionKey, but to the wrong partition.
I've some suspect this issue is related to #13 because if i send something from the NodeJS Client with partitionKey="sender", it goes to partition 14 (I'm guessing the hash of the string "sender" is 14).
Hi
Getting below error when trying to send Avro serialised string to event hub. Same code works fine when I pass example string to EventData_CreateWithNewMemory((const unsigned char*)msgContent, msgLength) function.
eventhub_error_callback EVENTHUBCLIENT_AMQP_INIT_FAILURE
Error: Time:Thu Aug 15 17:06:28 2019 File:/home/user/.conan/data/azure-event-hubs-c/0.11.0/user/testing/build/b3e5763fd959dd9b9d67066cbe456ec1e2e33bfe/source_subfolder/deps/azure-c-shared-utility/adapters/tlsio_openssl.c Func:tlsio_openssl_create Line:1174 Failed xio_create.
Error: Time:Thu Aug 15 17:06:28 2019 File:/home/user/.conan/data/azure-event-hubs-c/0.11.0/user/testing/build/b3e5763fd959dd9b9d67066cbe456ec1e2e33bfe/source_subfolder/eventhub_client/src/eventhubclient_ll.c Func:initialize_uamqp_stack_common Line:545 TLS IO creation failed.
Error: Time:Thu Aug 15 17:06:28 2019 File:/home/user/.conan/data/azure-event-hubs-c/0.11.0/user/testing/build/b3e5763fd959dd9b9d67066cbe456ec1e2e33bfe/source_subfolder/eventhub_client/src/eventhubclient_ll.c Func:initialize_uamqp_stack Line:709 Could Not Initialize Common AMQP Sender Stack.Error: Time:Thu Aug 15 17:06:28 2019 File:/home/user/.conan/data/azure-event-hubs-c/0.11.0/user/testing/build/b3e5763fd959dd9b9d67066cbe456ec1e2e33bfe/source_subfolder/eventhub_client/src/eventhubclient_ll.c Func:EventHubClient_LL_DoWork Line:1755 Error initializing uAMPQ sender stack. Code:708 Status:0
I am using libserdes to serialize Avro message.
Thanks
Kind Regards
From @sngpt08 on December 22, 2016 11:33
i am using this api to get the data from eventHub EventHubReceiver_ReceiveFromStartTimestampAsync(eventHubReceiveHandle, OnReceiveCB, NULL, OnErrorCB, NULL,now);
here now = time(NULL);
i am storing json string in eventhub. but most of the time my application got crashed because i got some junk char in my json data. but if i change the startTimestamp value it works.
so whats the way to figure out the correct offset value ?
Copied from original issue: Azure/azure-event-hubs#296
See here:
azure-event-hubs-c/eventhub_client/src/eventhubclient_ll.c
Lines 1732 to 1737 in 84d4094
When uAMQP stack cannot be initialized (e.g. due to firewall blocking the connection), eventhubclient does not notify users with theon_error_cb
callback.
What happen when uAMQP cannot be initialized? The client loops forever, polluting logs with these messages repeated indefinitely:
Error: Time:Thu Mar 16 16:52:43 2017 File:path_obfuscated/azure-event-hubs-c/azure-c-shared-utility/adapters/socketio_berkeley.c Func:socketio_open Line:380 Failure: connect failure 111.
Error: Time:Thu Mar 16 16:52:43 2017 File:path_obfuscated/azure-event-hubs-c/azure-c-shared-utility/src/tlsio_openssl.c Func:tlsio_openssl_close Line:1080 Invalid tlsio_state. Expected state is TLSIO_STATE_NOT_OPEN or TLSIO_STATE_CLOSING.
Error: Time:Thu Mar 16 16:52:43 2017 File:path_obfuscated/azure-event-hubs-c/azure-c-shared-utility/src/tlsio_openssl.c Func:on_underlying_io_open_complete Line:613 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Thu Mar 16 16:52:43 2017 File:path_obfuscated/azure-event-hubs-c/eventhub_client/src/eventhubauth.c Func:EventHubAuthCBS_Create Line:769 Could Not Open CBS Handle 153
Error: Time:Thu Mar 16 16:52:43 2017 File:path_obfuscated/azure-event-hubs-c/eventhub_client/src/eventhubclient_ll.c Func:create_sas_token Line:367 Couldn't create CBS based Auth Handle
Error: Time:Thu Mar 16 16:52:43 2017 File:path_obfuscated/azure-event-hubs-c/eventhub_client/src/eventhubclient_ll.c Func:initialize_uamqp_stack_common Line:585 create_sas_token failed.
Error: Time:Thu Mar 16 16:52:43 2017 File:path_obfuscated/azure-event-hubs-c/eventhub_client/src/eventhubclient_ll.c Func:initialize_uamqp_stack Line:696 Could Not Initialize Common AMQP Sender Stack.
Error: Time:Thu Mar 16 16:52:43 2017 File:path_obfuscated/azure-event-hubs-c/eventhub_client/src/eventhubclient_ll.c Func:EventHubClient_LL_DoWork Line:1736 Error initializing uAMPQ sender stack. Code:695 Status:0
Having on_error_cb
called when this happen, could let the user handle this exception, e.g. aborting the program.
Every EventData sent with a Batch has partitionKey "sender" in the EventHub.
How to reproduce: using the provided sample "send_batch", change connectionString with something valid. Run the sample. Inspect arrived events (e.g.: with https://github.com/paolosalvatori/ServiceBusExplorer). Actual partitionKey is sender
, expected is PartitionKeyInfo
(this is the string provided in the sample).
From @BretStateham on March 9, 2016 16:36
The links to the "samples" folder, and the various platform samples (Beaglebone Black, Fedora Linux, Ubuntu Linux, etc.) are broken on the https://github.com/Azure/azure-event-hubs/blob/master/c/README.md. Looks like they have all moved to the "docs" folder https://github.com/Azure/azure-event-hubs/tree/master/c/docs
Copied from original issue: Azure/azure-event-hubs#86
Hello,
I am recently added lib version 0.11.0 at our server and after some tests everything works fine.
In production the server started crash with the stack:
000000014019540B (Archpelago): (): xio_create
000000014019883B (Archpelago): (): tlsio_schannel_create
000000014019540B (Archpelago): (): xio_create
000000014018000B (Archpelago): (): create_batch_message
000000014017FE0E (Archpelago): (): create_batch_message
000000014017DE94 (Archpelago): (): EventHubClient_LL_DoWork
000000014017D29A (Archpelago): (): EventHub_DestroyUserContext
00000000774A59CD (kernel32): (): BaseThreadInitThunk
This bug is already fixed at commit 52ad285960d7500118c0f4765772618b464cb91c [Fixing a double destroy on xio (#266)] in azure-c-shared-utility. I already updated my server, fixing the crash!
Is it possible update the reference of azure-c-shared-utility of tag v0.11 to that commit ?
Thanks
From @cbaekdorf on October 21, 2015 12:45
How can I use Publisher Policy SAS key (giving each device a unique connection string) in the send.c sample (https://github.com/Azure/azure-event-hubs/tree/master/c/eventhub_client/samples/send)?
When using the Shared Access Key the connection string looks like “Endpoint=sb://my-namespace.servicebus.windows.net/;SharedAccessKeyName=SendAccess;SharedAccessKey=”, but how should the connection string look like if using a Publisher Policy SAS key with a publisher id?
I know how to do it using .NET library, but cannot figure out how to get it working with the C sample. I tried “Endpoint=sb://my-namespace.servicebus.windows.net/;SharedAccessSignature=SharedAccessSignature sr=sb%3a%2f%2fmy-namespace.servicebus.windows.net%2fmy-hub%2fpublishers%2fmyPublisherId&sig=&se=1445431507&skn=FullAccess;EntityPath=device-data-input-sample;Publisher=myPublisherId”, but that gives EVENTHUBCLIENT_INVALID_ARG.
In .NET I can use this "Endpoint=sb://mynamespace.servicebus.windows.net/;SharedAccessSignature=SharedAccessSignature sr=sb%3a%2f%2fmynamespace.servicebus.windows.net%2fmyinput%2fpublishers%2fdevice0000&sig=L4EIURzEV6Oxh.....12wYxFnsEzmo%3d&se=1445503693&skn=Send;EntityPath=myinput;Publisher=device0000;TransportType=Amqp;AmqpSecurityScheme=cbs" with the EventHubSender.CreateFromConnectionString(connectionString) but that is not working with the C code send.c sample.
Copied from original issue: Azure/azure-event-hubs#6
Hi ,
I am trying to access the payload from IoT hub and output that message by storing that in a variable but not able to get the way to do that any help will be appreciated,
The SDK should disambiguate between generic errors and message size exceeded when sending.
When sending and the message size exceeds the allowed message size, it shall return EVENTHUBCLIENT_DATA_SIZE_EXCEEDED.
There are important files that Microsoft projects should all have that are not present in this repository. A pull request has been opened to add the missing file(s). When the pr is merged this issue will be closed automatically.
Microsoft teams can learn more about this effort and share feedback within the open source guidance available internally.
<- [DETACH]* {0,true,* {amqp:connection:forced,The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker'. TrackingId:b4579bf8c0544384816472e551456d48_G6, SystemTracker:gateway5, Timestamp:10/23/2018 3:34:27 AM,NULL}}
-> [DETACH]* {0}
Error: Time:Tue Oct 23 11:34:27 2018 File:E:\HuWei\working\1.src\EventHub\deps\azure-uamqp-c\src\amqp_management.c Func:_on_message_sender_state_changed Line:388 Error, on_message_sender_state_changed called, new state: 4
Error: Time:Tue Oct 23 11:34:27 2018 File:E:\HuWei\working\1.src\EventHub\deps\azure-uamqp-c\src\cbs.c Func:_on_underlying_amqp_management_error Line:179 Unexpected AMQP error in CBS_STATE_OPEN state
<- [DETACH]* {1,true,* {amqp:connection:forced,The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker'. TrackingId:b4579bf8c0544384816472e551456d48_G6, SystemTracker:gateway5, Timestamp:10/23/2018 3:34:27 AM,NULL}}
-> [DETACH]* {1}
<- [END]* {NULL}
-> [END]* {}
<- [CLOSE]* {* {amqp:connection:forced,The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker'. TrackingId:b4579bf8c0544384816472e551456d48_G6, SystemTracker:gateway5, Timestamp:10/23/2018 3:34:27 AM,NULL}}
Hello,
my development environment is a bit unusual.
In our device environment where NTP Sync is not available, if I test it in conjunction with the azure-eventhub-c (https://github.com/Azure/azure-event-hubs-c) code,
the old time value already set in the device (ex: 2019.12. 31.hh.mm.ss) and then when I create a SAS Token value, eventhub always returns 401 unauthorized error.
What I want is,
When creating a SAS token on the azure-eventhub-c code, I would like to be guided by which part of the code needs to be modified in order to generate a long end expire time for SAS Token.
For example, I want to create a SAS token by ignoring the current device time and setting it statically to 2030.12.31 expire time.
If I generate a SAS token by using long time, will eventhub return 200 OK?
Allow a sender to sent the partition id for a particular event hub.
I use Receive sample:
https://github.com/Azure/azure-event-hubs-c/tree/master/eventhub_client/samples/receive
And edit it to connect to Event Hub-compatible endpoint of Azure iot hub to receive Device-To-Cloud messages.
static const char* connectionString = "Endpoint=[MY Event Hub-compatible endpoint];SharedAccessKeyName=service;SharedAccessKey=[MY SharedAccessKeyValue]";
static const char* eventHubPath = "messages/events";
static const char* consumerGroup = "$Default"; //example "$Default"
static const char* partitionId = "0"; //example "0"
After running I get the following error information:
Error: Time:Wed Apr 5 16:15:39 2017 File:C:\Users\v-luhan\Downloads\azure-event-hubs-c-master\azure-event-hubs-c-master\eventhub_client\src\eventhubreceiver_ll.c Func:_HandleSASTokenAuth Line:264 EventHubAuthCBS Status Failed.
If I continue to call the send () function in a non-network situation, there is a problem that the process dies due to an infinite loop and excessive use of stack memory.
If there is no network, the log cannot be sent and the queue is accumulated, which seems to be the result. Is there an option to check network availability in code?
Regarding the Readme:
Azure Event Hub Client for C / Building the library / 2 Configure your build by running: Ex 1. cmake ..
the following error occurs:
CMake Error at CMakeLists.txt:100 (include):
include could not find load file:
/configs/azure_iot_build_rules.cmake
There isn't a file called azure_iot_build_rules.cmake
in the path /configs
Now the Readme doesn't say to do a submodule update, it merely says:
When switching branches in this repository, remember to update the submodules by:
git submodule update --init --recursive
and because the user doesn't switch branches, he is not mistaken by not doing this.
I found that on Ubuntu, if I did a submodule upgrade despite it not saying to do so - and this didn't pull in the missing file - that it built properly without complaining about the missing file.
I think the Readme just needs updating!
I'm using EventHubClient with Linux on x86_64 and after the first call to EventHubClient_Send, the program is using 100% of cpu.
Events are successfully sent.
To test it:
#include <azure_c_shared_utility/platform.h>
#include <eventdata.h>
#include <eventhubclient.h>
#include <iostream>
#include <unistd.h>
#include <vector>
int main() {
platform_init();
const char* connectionString = "_PLACE_HERE_YOUR_CONNECTION_STRING_";
const char* eventhubPath = "_PLACE_HERE_YOUR_PATH_";
auto client = EventHubClient_CreateFromConnectionString(connectionString, eventhubPath);
std::vector<unsigned char> data{{0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64}};
EVENTDATA_HANDLE dataHandle = EventData_CreateWithNewMemory(data.data(), data.size());
while (true) {
if (EventHubClient_Send(client, dataHandle) != EVENTHUBCLIENT_OK) {
std::cerr << "cannot send event :(\n";
} else {
std::cerr << "event sent :)\n";
}
::sleep(1);
}
EventHubClient_Destroy(client);
platform_deinit();
}
Compile with GCC 4.9.4:
g++ example.cpp -o example -std=c++11 -leventhub_client -luamqp -laziotsharedutil -lssl -lcrypto -lpthread
I investigated with valgrind/callgrind, finding out EventhubClientThread
is using the cpu.
Adding a sleep in EventhubClientThread
loop keeps the cpu idle:
File: eventhubclient.c
static int EventhubClientThread(void* userContextCallback)
{
EVENTHUBCLIENT_STRUCT* eventhubInfo = (EVENTHUBCLIENT_STRUCT*)userContextCallback;
while (eventhubInfo->threadToContinue == THREAD_CONTINUE)
{
if (Lock(eventhubInfo->lockInfo) == LOCK_OK)
{
EventHubClient_LL_DoWork(eventhubInfo->eventhubclientLLHandle);
(void)Unlock(eventhubInfo->lockInfo);
}
else
{
LOG_ERROR(EVENTHUBCLIENT_ERROR);
}
usleep(1000);
}
return 0;
}
I guess this isn't the right solution.
Hi,
I am trying to connect azure event hub using Eventhub_sample/send using sastoken.
The api used is EventHubClient_CreateFromSASToken(sastoken);
In version 0.12.0, This is crashing in uamqp library in connection->do_work().
Version 0.10.0, 0.11.0, I am getting sas token expiry error. Logs attached.
sastoken_error.txt
The same sastoken works fine for me in uamqp library.
We want to move to azure-event-hub because it handles network glitches and supports batch processing.
Please have a look at this issue asap and let me know if you have any queries.
if these SDK works in Ubuntu 12.04 environment and RT Linux ?
Thanks
BR
azure event hub client crashing occasionally and during the time we are able to see "event hub internal error" also increasing on the metrics provided at the Azure portal.
here is the stack trace from the client side,
Jul 05 12:40:36 [CRIT] [0]
Jul 05 12:40:36 [CRIT] [1] BUFFER_delete
Jul 05 12:40:36 [CRIT] [2] EventData_Destroy
Jul 05 12:40:36 [CRIT] [3]
Jul 05 12:40:36 [CRIT] [4]
Jul 05 12:40:36 [CRIT] [5]
Jul 05 12:40:36 [CRIT] [6]
Jul 05 12:40:36 [CRIT] [7]
Jul 05 12:40:36 [CRIT] [8]
Jul 05 12:40:36 [CRIT] [9]
Jul 05 12:40:36 [CRIT] [10]
Jul 05 12:40:36 [CRIT] [11] frame_codec_receive_bytes
Jul 05 12:40:36 [CRIT] [12]
Jul 05 12:40:36 [CRIT] [13]
Jul 05 12:40:36 [CRIT] [14]
Jul 05 12:40:36 [CRIT] [15]
Jul 05 12:40:36 [CRIT] [16]
Jul 05 12:40:36 [CRIT] [17] socketio_dowork
Jul 05 12:40:36 [CRIT] [18] xio_dowork
Jul 05 12:40:36 [CRIT] [19] tlsio_openssl_dowork
Jul 05 12:40:36 [CRIT] [20] xio_dowork
Jul 05 12:40:36 [CRIT] [21] saslclientio_dowork
Jul 05 12:40:36 [CRIT] [22] xio_dowork
Jul 05 12:40:36 [CRIT] [23] connection_dowork
Jul 05 12:40:36 [CRIT] [24] EventHubClient_LL_DoWork
Jul 05 12:40:36 [CRIT] [25]
Jul 05 12:40:36 [CRIT] [26]
Jul 05 12:40:36 [CRIT] [27]
Jul 05 12:40:36 [CRIT] [28] clone
one more,
Jul 04 16:56:01 [CRIT] <<<<<< Printing Stack Trace >>>>>>
Jul 04 16:56:01 [CRIT] [0]
Jul 04 16:56:01 [CRIT] [1] freeaddrinfo
Jul 04 16:56:01 [CRIT] [2] socketio_open
Jul 04 16:56:01 [CRIT] [3] xio_open
Jul 04 16:56:01 [CRIT] [4] tlsio_openssl_open
Jul 04 16:56:01 [CRIT] [5] xio_open
Jul 04 16:56:01 [CRIT] [6] saslclientio_open
Jul 04 16:56:01 [CRIT] [7] xio_open
Jul 04 16:56:01 [CRIT] [8] connection_open
Jul 04 16:56:01 [CRIT] [9] session_begin
Jul 04 16:56:01 [CRIT] [10] link_attach
Jul 04 16:56:01 [CRIT] [11] messagereceiver_open
Jul 04 16:56:01 [CRIT] [12] amqp_management_open_async
Jul 04 16:56:01 [CRIT] [13] cbs_open_async
Jul 04 16:56:01 [CRIT] [14] EventHubAuthCBS_Create
Jul 04 16:56:01 [CRIT] [15]
Jul 04 16:56:01 [CRIT] [16]
Jul 04 16:56:01 [CRIT] [17]
Jul 04 16:56:01 [CRIT] [18] EventHubClient_LL_DoWork
Jul 04 16:56:01 [CRIT] [19]
Jul 04 16:56:01 [CRIT] [20]
Jul 04 16:56:01 [CRIT] [21]
Jul 04 16:56:01 [CRIT] [22] clone
we are able to correlate "event hub internal error" on the metrics provided at the Azure portal.
i have tried this sample in Ubuntu.
https://github.com/Azure/azure-event-hubs-c/blob/master/docs/desktop_ubuntu_setup.md
Sender working successfully. but receiver command not working
root@ala:~# ~/cmake/eventhub_client/samples/receive/receive
Info: Event Hubs Client SDK for C, version 0.10.0
Error: Time:Wed Apr 11 16:06:22 2018 File:/home/ala/azure-event-hubs/c/eventhub_client/src/eventhubreceiver_ll.c Func:HandleSASTokenAuth Line:277 EventHubAuthCBS Authentication Status Timed Out.
Error: Time:Wed Apr 11 16:06:22 2018 File:/home/ala/azure-event-hubs/c/eventhub_client/src/eventhubreceiver_ll.c Func:EventHubReceiver_LL_DoWork Line:1831 Authorization Timeout Observed
-> [CLOSE]* {}
ERROR: Unexpected Error Callback Triggered! 6
Hi Everyone,
line 88 in send example, the connection string and eventhub name are used. Instead of that I want to use SAS token, so I replaced the line with the method-->
EVENTHUBCLIENT_HANDLE eventHubClientHandle = EventHubClient_CreateFromSASToken(SAS_TOKEN);
Where SAS_TOKEN argument is the const char* containing the SAS token. The code compiles and runs on my rpi but there is a parser function which couldn't fetch the parameters from the SAS_TOKEN.
here is the exact error in run time:
Starting the EventHub Client Send Sample (0.10.0)...
Custom Info: Event Hubs Client SDK for C, version 0.10.0
Custom Error: File:/home/pi/azure-event-hubs-c/eventhub_client/src/eventhubclient_ll.c Func:EventHubClient_LL_CreateFromSASToken Line:1087 Could Not Obtain Connection Parameters from EventHubAuthCBS_SASToken Parse.
Custom Error: File:/home/pi/azure-event-hubs-c/eventhub_client/src/eventhubclient.c Func:EventHubClient_CreateFromSASToken Line:273 result = EVENTHUBCLIENT_INVALID_ARG
ERROR: EventHubClient_CreateFromConnectionString returned NULL!
last thing, I am sure that my SAS_TOKEN is working because i tested it in a different example SDK.
Thanks,
kind regards.
Hi everyone,
Is there any way to access the system properties (i.e. accessing a property such as iothub-connection-device-id
). In the other SDKs, I have seen some methods to be able to access them, but I have not seen a way to do the same with this SDK.
Thank you!
I am using one of the samples from uAMQP library, eh_sender_with_sas_token_sample(https://github.com/Azure/azure-uamqp-c). I modified to send 1MB data as our event hub supports 1MB bandwidth. Attached is the modified code which takes file(1MB) as an command line argument and try to send twice in a loop. Please have a look at it.
But what I noticed is I can send up to ~65KB, beyond that the library is crashing in IO processing event loop. Most likely crash is due to processing removed io event from the list again.
Trace:
Info: Removed:(List=00000295FE388E10, Item=00000295FE379330)
Connection_do_work:-------------------2
Info: Removed:(List=00000295FE379510, Item=00000295FE379330) --> Accessed and removed twice same list item from two different list.
And also I remember that we were successful in sending 1MB data year back or so. Don’t remember which version of library we used during our initial stage of development. I tried with latest version of library(master) which breaks CBS authentication. Also explored degrading to 1.2.9 and 1.2.10 version. Currently we are using 1.2.11 version. Crash is observed on both Windows and Linux system.
I am having issues compiling the library using /TP.
I use the cmake-gui to create a default Visual Studio 14 Win64 solution.
I select properties -> C/C++/Advanced/Compile As within Visual Studio.
I receive several compilation issues especially in the shared util code base.
Any suggestions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.