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.
constcreateReceiver=async({ connStr ='', partitionIds =[], errorHandler =defaultErrorHandler, messageHandler =defaultMessageHandler}={})=>{constclient=EventHubClient.fromConnectionString(connStr);awaitclient.open();partitionIds.forEach(async(partitionId)=>{// how to make startAfterTime to the time connection closed?constreceiver=awaitclient.createReceiver('$Default',partitionId,{startAfterTime: Date.now()});receiver.on('errorReceived',async(err)=>{// right?if(err.transport&&err.transport.name==='AmqpProtocolError'){console.log(`worker #${cluster.worker.id} PID:${process.pid} Restart #${partitionId}`);// right?awaitcreateReceiver({ connStr,partitionIds: [partitionId], errorHandler, messageHandler });}else{awaiterrorHandler(err);}});receiver.on('message',messageHandler);});};
i guess perhaps it may be related to checkpoint and storage,
as #26 reported connection closed often.
and i have no idea about the err handling.
i guess perhaps it may be related to checkpoint and storage,
like sample in dot net: https://github.com/Azure/azure-event-hubs/blob/master/samples/DotNet/Microsoft.Azure.EventHubs/SampleEphReceiver/SimpleEventProcessor.cs
https://blogs.msdn.microsoft.com/kaevans/2015/02/24/scaling-azure-event-hubs-processing-with-worker-roles/
and java: https://github.com/Azure/azure-event-hubs/blob/002a2056dda20fa79237fbc8bbdab3ef80065307/samples/Java/src/main/java/com/microsoft/azure/eventhubs/samples/Basic/EventProcessorSample.java
The text was updated successfully, but these errors were encountered: