You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
constreceiver=awaitclient.createReceiver('$Default',partitionId,{startAfterTime: Date.now()});// we use startAfterOffsetreceiver.on('errorReceived',async(err)=>{if(err.transport&&err.transport.name==='AmqpProtocolError'){console.log(`Restart #${partitionId}`);awaitcreateReceiver({ connStr, errorHandler, messageHandler });}else{awaiterrorHandler(err);}});
when AmqpProtocolError, we will reconnect eventhubs.
but we( @zhangyf92 ) found that:
@willin - We have a new preview version "0.1.0" of the event hubs node.js client. This client was re-written from scratch. Please try the new version and let us know if you still see issues. You can find examples over here.
https://github.com/AirDwing/iothub-mqtt-demo/blob/master/server/lib/eventhub.js#L29-L35
when
AmqpProtocolError
, we will reconnect eventhubs.but we( @zhangyf92 ) found that:
after 2017-8-19 never restart again and message lost, cannot received. when we killed the process and restart server, message can be received.
i looked into source code: https://github.com/Azure/azure-event-hubs-node/issues#L40-L47
whether add a close event listener can be helpful? ref: https://noodlefrenzy.github.io/node-amqp10/AMQPClient.html#event:connection:closed
The text was updated successfully, but these errors were encountered: