latest code of iotservice client is not working. It uses wrong version of amqp lib functions.
Application could not get started due to wrong method signture being used from eventhub package. I am trying to use iotservice client on my application. I end up gettng below error.
Looks as if latest code does not use amqp 1.0.1 Lib.
Some how I managed to use old iotservice client code. but no luck. I am getting below error continuously wile using SendEvent() for sending C2D message.
Error: protocol error: received flow without next-incoming-id after session established
IoTHubClient, connectionErr := iotservice.NewFromConnectionString(SERVICE_CONNECTION_STRING)
if connectionErr != nil {
logger.Error(connectionErr)
}
ctx, cancel := context.WithTimeout(context.Background(), DEFAULT_CONTEXT_TIMEOUT_SEC*time.Second)
defer cancel()
sendError := IoTHubClient.SendEvent(ctx, DEVICE_ID, payload,
iotservice.WithSendProperties(msgProperties),
iotservice.WithSendAck(iotservice.AckPositive),
iotservice.WithSendUserID("Go lang Iot Service Client"),
iotservice.WithSendMessageID(id.String()))
if sendError != nil {
logger.Error("Error occurred while sending C-2-D message for device: ", DEVICE_ID, ", Error: ", sendError)
}
Could you please help me on this? Its quite urgent.
Thanks in advance.
Could you try updating to @master?
Doing above solved the application startup error. Now application is getting started. But while sending C2D message it throws same error.
### protocol error: received flow without next-incoming-id after session established
Is the iotservice client tested to send C2D message?
Could you try updating to
@master?
@amenzhinsky Can you add a new tag to the latest commit that solves the amqp library issue instead of using @master to the go mod file?
Thanks for maintaining this library!