Azure / azure-event-hubs-node

Node client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
MIT License
50 stars 44 forks source link

Disconnected after 30min of inactivity #96

Closed MatejSkrbis closed 6 years ago

MatejSkrbis commented 6 years ago

When connecting to event hub and sending some packages and then waiting for 30 minutes without sending anything client gets disconnected.

For every minute after 35 minutes [connection-1] disconnected is printed in console. Bellow you will find some debug logs.

No message is sent if client tries to send after 35 minutes. I can't find a way how to handle such error as there are no example and neither does client have any such exposed methods/callbacks. I would expect library to handle such cases (if not can you please tell me how to handle them).

I'm using windows 10 with "azure-event-hubs": "0.2.3", node version: 8.9.4

2018-07-12T07:37:20.330Z rhea:io [connection-1] read 412 bytes
2018-07-12T07:37:20.331Z rhea:io [connection-1] got frame of size 412
2018-07-12T07:37:20.331Z rhea:frames [connection-1] RECV: '{"size":412,"type":0,"channel":1,"performative":{"type":"detach#16","closed":true,"error":{"type":"error#1d","condition":"amqp:link:detach-forced","description":"The link \'G28:2442062:e5672a79-59f4-4d35-a8b9-762bc0e6d5f0\' is force detached by the broker due to errors occurred in publisher(link1083). Detach origin: AmqpEventHubPublisher.IdleTimerExpired: Idle timeout: 00:30:00. TrackingId:c30fff69000003c20000043b5b46fe24_G28_B8, SystemTracker:streams:eventhub:test-hub~32766, Timestamp:7/12/2018 7:37:20 AM"}}}'
2018-07-12T07:37:20.332Z rhea:events Link got event: sender_error
2018-07-12T07:37:20.351Z azure:event-hubs:sender [connection-1] An error occurred for sender 'e5672a79-59f4-4d35-a8b9-762bc0e6d5f0': { DetachForcedError: The link 'G28:2442062:e5672a79-59f4-4d35-a8b9-762bc0e6d5f0' is force detached by the broker due to errors occurred in publisher(link1083). Detach origin: AmqpEventHubPublisher.IdleTimerExpired: Idle timeout: 00:30:00. TrackingId:c30fff69000003c20000043b5b46fe24_G28_B8, SystemTracker:streams:eventhub:test-hub~32766, Timestamp:7/12/2018 7:37:20 AM
    at Object.translate (c:\srv\ConnectedTravel\stream-service\node_modules\azure-event-hubs\lib\errors.ts:361:19)
    at Sender.onAmqpError (c:\srv\ConnectedTravel\stream-service\node_modules\azure-event-hubs\lib\eventHubSender.ts:273:31)
    at emitOne (events.js:116:13)
    at Sender.emit (events.js:211:7)
    at Sender.link.dispatch (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\link.js:59:37)
    at Sender.link.on_detach (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\link.js:156:32)
    at Session.on_detach (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\session.js:688:27)
    at Connection.(anonymous function) [as on_detach] (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\connection.js:671:30)
    at c.dispatch (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\types.js:904:33)
    at Transport.read (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\transport.js:95:36)
  name: 'DetachForcedError',
  translated: true,
  retryable: false,
  info: null,
  condition: 'amqp:link:detach-forced' }.
2018-07-12T07:37:20.352Z rhea:events Link got event: sender_close
2018-07-12T07:37:20.352Z rhea:events Session got event: sender_close
2018-07-12T07:37:20.352Z rhea:events Connection got event: sender_close
2018-07-12T07:37:20.352Z rhea:events Container got event: sender_close
2018-07-12T07:39:20.113Z rhea:frames [connection-1] PENDING: '{"channel":0,"type":0}'
2018-07-12T07:39:20.113Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 08 02 00 00 00>
2018-07-12T07:40:12.681Z rhea:io [connection-1] read 35 bytes
2018-07-12T07:40:12.681Z rhea:io [connection-1] got frame of size 35
2018-07-12T07:40:12.682Z rhea:frames [connection-1] RECV: '{"size":35,"type":0,"channel":0,"performative":{"type":"flow#13","next_incoming_id":1,"incoming_window":5000,"next_outgoing_id":2,"outgoing_window":2046,"echo":true}}'
2018-07-12T07:41:20.112Z rhea:frames [connection-1] PENDING: '{"channel":0,"type":0}'
2018-07-12T07:41:20.112Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 08 02 00 00 00>
2018-07-12T07:42:20.330Z rhea:io [connection-1] read 268 bytes
2018-07-12T07:42:20.330Z rhea:io [connection-1] got frame of size 268
2018-07-12T07:42:20.331Z rhea:frames [connection-1] RECV: '{"size":268,"type":0,"channel":0,"performative":{"type":"detach#16","closed":true,"error":{"type":"error#1d","condition":"amqp:connection:forced","description":"The connection was inactive for more than the allowed 300000 milliseconds and is closed by container \'LinkTracker\'. TrackingId:199d4ef5701b45dd9f64a6fc9fcde7f4_G28, SystemTracker:gateway5, Timestamp:7/12/2018 7:42:20 AM"}}}'
2018-07-12T07:42:20.331Z rhea:events Link got event: sender_error
2018-07-12T07:42:20.338Z azure:event-hubs:cbs An error occurred on the cbs sender link.. { ConnectionForcedError: The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker'. TrackingId:199d4ef5701b45dd9f64a6fc9fcde7f4_G28, SystemTracker:gateway5, Timestamp:7/12/2018 7:42:20 AM
    at Object.translate (c:\srv\ConnectedTravel\stream-service\node_modules\azure-event-hubs\lib\errors.ts:361:19)
    at Sender._cbsSenderReceiverLink.sender.on (c:\srv\ConnectedTravel\stream-service\node_modules\azure-event-hubs\lib\cbs.ts:74:27)
    at emitOne (events.js:116:13)
    at Sender.emit (events.js:211:7)
    at Sender.link.dispatch (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\link.js:59:37)
    at Sender.link.on_detach (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\link.js:156:32)
    at Session.on_detach (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\session.js:688:27)
    at Connection.(anonymous function) [as on_detach] (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\connection.js:671:30)
    at c.dispatch (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\types.js:904:33)
    at Transport.read (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\transport.js:95:36)
  name: 'ConnectionForcedError',
  translated: true,
  retryable: false,
  info: null,
  condition: 'amqp:connection:forced' }
2018-07-12T07:42:20.339Z rhea:events Link got event: sender_close
2018-07-12T07:42:20.339Z rhea:events Session got event: sender_close
2018-07-12T07:42:20.339Z rhea:events Connection got event: sender_close
2018-07-12T07:42:20.339Z rhea:events Container got event: sender_close
2018-07-12T07:42:20.536Z rhea:io [connection-1] read 571 bytes
2018-07-12T07:42:20.536Z rhea:io [connection-1] got frame of size 275
2018-07-12T07:42:20.537Z rhea:frames [connection-1] RECV: '{"size":275,"type":0,"channel":0,"performative":{"type":"detach#16","handle":1,"closed":true,"error":{"type":"error#1d","condition":"amqp:connection:forced","description":"The connection was inactive for more than the allowed 300000 milliseconds and is closed by container \'LinkTracker\'. TrackingId:199d4ef5701b45dd9f64a6fc9fcde7f4_G28, SystemTracker:gateway5, Timestamp:7/12/2018 7:42:20 AM"}}}'
2018-07-12T07:42:20.537Z rhea:events Link got event: receiver_error
2018-07-12T07:42:20.538Z azure:event-hubs:cbs An error occurred on the cbs receiver link.. { ConnectionForcedError: The connection was inactive for more than the allowed 300000 milliseconds and is closed by container 'LinkTracker'. TrackingId:199d4ef5701b45dd9f64a6fc9fcde7f4_G28, SystemTracker:gateway5, Timestamp:7/12/2018 7:42:20 AM
    at Object.translate (c:\srv\ConnectedTravel\stream-service\node_modules\azure-event-hubs\lib\errors.ts:361:19)
    at Receiver._cbsSenderReceiverLink.receiver.on (c:\srv\ConnectedTravel\stream-service\node_modules\azure-event-hubs\lib\cbs.ts:78:27)
    at emitOne (events.js:116:13)
    at Receiver.emit (events.js:211:7)
    at Receiver.link.dispatch (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\link.js:59:37)
    at Receiver.link.on_detach (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\link.js:156:32)
    at Session.on_detach (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\session.js:688:27)
    at Connection.(anonymous function) [as on_detach] (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\connection.js:671:30)
    at c.dispatch (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\types.js:904:33)
    at Transport.read (c:\srv\ConnectedTravel\stream-service\node_modules\rhea\lib\transport.js:95:36)
  name: 'ConnectionForcedError',
  translated: true,
  retryable: false,
  info: null,
  condition: 'amqp:connection:forced' }
2018-07-12T07:42:20.538Z rhea:events Link got event: receiver_close
2018-07-12T07:42:20.538Z rhea:events Session got event: receiver_close
2018-07-12T07:42:20.538Z rhea:events Connection got event: receiver_close
2018-07-12T07:42:20.538Z rhea:events Container got event: receiver_close
2018-07-12T07:42:20.538Z rhea:io [connection-1] got frame of size 15
2018-07-12T07:42:20.538Z rhea:frames [connection-1] RECV: '{"size":15,"type":0,"channel":0,"performative":{"type":"end#17"}}'
2018-07-12T07:42:20.539Z rhea:events Session got event: session_close
2018-07-12T07:42:20.539Z rhea:events Connection got event: session_close
2018-07-12T07:42:20.539Z rhea:events Container got event: session_close
2018-07-12T07:42:20.539Z rhea:io [connection-1] got frame of size 15
2018-07-12T07:42:20.539Z rhea:frames [connection-1] RECV: '{"size":15,"type":0,"channel":1,"performative":{"type":"end#17"}}'
2018-07-12T07:42:20.539Z rhea:events Session got event: session_close
2018-07-12T07:42:20.539Z rhea:events Connection got event: session_close
2018-07-12T07:42:20.539Z rhea:events Container got event: session_close
2018-07-12T07:42:20.539Z rhea:io [connection-1] got frame of size 266
2018-07-12T07:42:20.539Z rhea:frames [connection-1] RECV: '{"size":266,"type":0,"channel":0,"performative":{"type":"close#18","error":{"type":"error#1d","condition":"amqp:connection:forced","description":"The connection was inactive for more than the allowed 300000 milliseconds and is closed by container \'LinkTracker\'. TrackingId:199d4ef5701b45dd9f64a6fc9fcde7f4_G28, SystemTracker:gateway5, Timestamp:7/12/2018 7:42:20 AM"}}}'
2018-07-12T07:42:20.540Z rhea:events Connection got event: connection_error
2018-07-12T07:42:20.540Z rhea:events Container got event: connection_error
2018-07-12T07:42:20.540Z rhea:events Connection got event: connection_close
2018-07-12T07:42:20.540Z rhea:events Container got event: connection_close
2018-07-12T07:42:20.540Z rhea:frames [connection-1] PENDING: '{"channel":0,"type":0,"performative":["0b3633be-12f0-9c45-8644-bc80ae7657bc","streams.servicebus.windows.net",null,null,null,null,null,null,null,["product","MSJSClient","version","0.2.3","platform","(x64-Windows_NT-10.0.17134)","framework","Node/v8.9.4","user-agent","/js-event-hubs"]]}'
2018-07-12T07:42:20.541Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 ea 02 00 00 00 00 53 10 d0 00 00 00 da 00 00 00 0a a1 24 30 62 33 36 33 33 62 65 2d 31 32 66 30 2d 39 63 34 35 2d 38 36 34 34 2d 62 63 38 30 ... >
2018-07-12T07:42:20.541Z rhea:frames [connection-1] PENDING: '{"channel":0,"type":0,"performative":[]}'
2018-07-12T07:42:20.541Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 0c 02 00 00 00 00 53 17 45>
2018-07-12T07:42:20.541Z rhea:frames [connection-1] PENDING: '{"channel":1,"type":0,"performative":[]}'
2018-07-12T07:42:20.541Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 0c 02 00 00 01 00 53 17 45>
2018-07-12T07:42:20.541Z rhea:frames [connection-1] PENDING: '{"channel":0,"type":0,"performative":[]}'
2018-07-12T07:42:20.542Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 0c 02 00 00 00 00 53 18 45>
2018-07-12T07:42:20.935Z rhea:reconnect Scheduled reconnect in 100ms
2018-07-12T07:42:20.936Z rhea:events Connection got event: disconnected
2018-07-12T07:42:20.936Z rhea-promise Error occurred on the amqp connection. c {
  value: 
   [ Typed { type: [Object], value: 'amqp:connection:forced' },
     Typed {
       type: [Object],
       value: 'The connection was inactive for more than the allowed 300000 milliseconds and is closed by container \'LinkTracker\'. TrackingId:199d4ef5701b45dd9f64a6fc9fcde7f4_G28, SystemTracker:gateway5, Timestamp:7/12/2018 7:42:20 AM' },
     Typed { type: [Object], value: null } ] }
2018-07-12T07:42:21.036Z rhea:reconnect reconnecting...
2018-07-12T07:42:21.037Z rhea:frames [connection-1] PENDING: '{"channel":0,"type":0,"performative":["0b3633be-12f0-9c45-8644-bc80ae7657bc","streams.servicebus.windows.net",null,null,null,null,null,null,null,["product","MSJSClient","version","0.2.3","platform","(x64-Windows_NT-10.0.17134)","framework","Node/v8.9.4","user-agent","/js-event-hubs"]]}'
2018-07-12T07:42:21.541Z rhea:io [connection-1] connected 10.10.1.114:64385 -> 40.112.242.0:5671
2018-07-12T07:42:21.707Z rhea:io [connection-1] read 8 bytes
2018-07-12T07:42:21.707Z rhea:frames [connection-1] RECV: { protocol_id: 3, major: 1, minor: 0, revision: 0 }
2018-07-12T07:42:21.913Z rhea:io [connection-1] read 63 bytes
2018-07-12T07:42:21.913Z rhea:io [connection-1] got frame of size 63
2018-07-12T07:42:21.913Z rhea:frames [connection-1] RECV: '{"size":63,"type":1,"performative":{"type":"sasl_mechanisms#40","sasl_server_mechanisms":["MSSBCBS","PLAIN","ANONYMOUS","EXTERNAL"]}}'
2018-07-12T07:42:21.914Z rhea:frames [connection-1] PENDING: '{"channel":0,"type":1,"performative":["ANONYMOUS",{"type":"Buffer","data":[0,82,111,111,116,77,97,110,97,103,101,83,104,97,114,101,100,65,99,99,101,115,115,75,101,121]},"streams.servicebus.windows.net"]}'
2018-07-12T07:42:21.914Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 5b 02 01 00 00 00 53 41 d0 00 00 00 4b 00 00 00 03 a3 09 41 4e 4f 4e 59 4d 4f 55 53 a0 1a 00 52 6f 6f 74 4d 61 6e 61 67 65 53 68 61 72 65 64 ... >
2018-07-12T07:42:22.079Z rhea:io [connection-1] read 26 bytes
2018-07-12T07:42:22.079Z rhea:io [connection-1] got frame of size 26
2018-07-12T07:42:22.080Z rhea:frames [connection-1] RECV: '{"size":26,"type":1,"performative":{"type":"sasl_outcome#44","additional_data":{"type":"Buffer","data":[87,101,108,99,111,109,101,33]}}}'
2018-07-12T07:42:22.080Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 ea 02 00 00 00 00 53 10 d0 00 00 00 da 00 00 00 0a a1 24 30 62 33 36 33 33 62 65 2d 31 32 66 30 2d 39 63 34 35 2d 38 36 34 34 2d 62 63 38 30 ... >
2018-07-12T07:42:22.246Z rhea:io [connection-1] read 8 bytes
2018-07-12T07:42:22.246Z rhea:frames [connection-1] RECV: { protocol_id: 0, major: 1, minor: 0, revision: 0 }
2018-07-12T07:42:22.412Z rhea:io [connection-1] read 70 bytes
2018-07-12T07:42:22.412Z rhea:io [connection-1] got frame of size 70
2018-07-12T07:42:22.412Z rhea:frames [connection-1] RECV: '{"size":70,"type":0,"channel":0,"performative":{"type":"open#10","container_id":"08944c60d79e4dd6b578bea10a277c4e_G8","max_frame_size":65536,"channel_max":4999,"idle_time_out":240000}}'
2018-07-12T07:42:22.412Z rhea:events Connection got event: connection_open
2018-07-12T07:42:22.412Z rhea:events Container got event: connection_open
2018-07-12T07:43:22.238Z rhea:io [connection-1] read 264 bytes
2018-07-12T07:43:22.239Z rhea:io [connection-1] got frame of size 264
2018-07-12T07:43:22.239Z rhea:frames [connection-1] RECV: '{"size":264,"type":0,"channel":0,"performative":{"type":"close#18","error":{"type":"error#1d","condition":"amqp:connection:forced","description":"The connection was inactive for more than the allowed 60000 milliseconds and is closed by container \'LinkTracker\'. TrackingId:08944c60d79e4dd6b578bea10a277c4e_G8, SystemTracker:gateway5, Timestamp:7/12/2018 7:43:21 AM"}}}'
2018-07-12T07:43:22.239Z rhea:events Connection got event: connection_error
2018-07-12T07:43:22.239Z rhea:events Container got event: connection_error
2018-07-12T07:43:22.239Z rhea:events Connection got event: connection_close
2018-07-12T07:43:22.239Z rhea:events Container got event: connection_close
2018-07-12T07:43:22.240Z rhea:frames [connection-1] PENDING: '{"channel":0,"type":0,"performative":["0b3633be-12f0-9c45-8644-bc80ae7657bc","streams.servicebus.windows.net",null,null,null,null,null,null,null,["product","MSJSClient","version","0.2.3","platform","(x64-Windows_NT-10.0.17134)","framework","Node/v8.9.4","user-agent","/js-event-hubs"]]}'
2018-07-12T07:43:22.240Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 ea 02 00 00 00 00 53 10 d0 00 00 00 da 00 00 00 0a a1 24 30 62 33 36 33 33 62 65 2d 31 32 66 30 2d 39 63 34 35 2d 38 36 34 34 2d 62 63 38 30 ... >
2018-07-12T07:43:22.240Z rhea:frames [connection-1] PENDING: '{"channel":0,"type":0,"performative":[]}'
2018-07-12T07:43:22.240Z rhea:raw [connection-1] SENT: <Buffer 00 00 00 0c 02 00 00 00 00 53 18 45>
2018-07-12T07:43:22.634Z rhea:reconnect Scheduled reconnect in 100ms
2018-07-12T07:43:22.635Z rhea:events Connection got event: disconnected
2018-07-12T07:43:22.635Z rhea:events Container got event: disconnected
[connection-1] disconnected 
[connection-1] disconnected 
[connection-1] disconnected 
[connection-1] disconnected 
[connection-1] disconnected 
amarzavery commented 6 years ago

@MatejSkrbis - Thanks for reporting this issue. Current version of the azure-event-hubs sdk does not handle disconnect errors at any level. I just merged couple of PRs yesterday in the master branch that handle disconnects.

I am testing this right now. It would great if you could test the code merged in master branch and let me know how the sdk behaves.

Here are the steps to build the sdk from scratch and it is super simple

npm i -g typescript (in case you do not have typescript installed globally)
git clone https://github.com/Azure/azure-event-hubs-node.git
cd azure-eventhubs-node\client
npm i
npm run build

That is it. That should get everything ready for you.

In your application's package.json

"azure-event-hubs": "../azure-event-hubs-node/client" // relative path to the cloned repo

Let me know your findings.

MatejSkrbis commented 6 years ago

I've tried to build and use this SDK. It seems it handles the case I mentioned above. After 30 min of inactivity the connection gets broken and then reestablished as it is expected. [connection-1] disconnected is no longer displayed and I am still able to send packages through connection.

amarzavery commented 6 years ago

That is awesome. Thank you for testing the changes. Shall publish a package tomorrow morning with updates.

amarzavery commented 6 years ago

@MatejSkrbis - azure-event-hubs@0.2.4 has been published.

MatejSkrbis commented 6 years ago

I left the connection over night and it seems it didn't work in the morning when I tried sending message. I have attached the debug log if it helps.

2018-07-17T06:13:00.608Z azure:event-hubs:sender [connection-1] Sender '6f16761e-99aa-4a45-b38a-5c26c2ca12f4', trying to send EventData[].
2018-07-17T06:13:00.609Z azure:amqp-common:datatransformer [encode] The given message body that needs to be encoded is:  {...}
2018-07-17T06:13:00.609Z azure:amqp-common:datatransformer [encode] The encoded message body is: Section {
  typecode: 117,
  content: <Buffer ... >,
  multiple: undefined }.
2018-07-17T06:13:00.610Z rhea:message Encoding section 1 of 5: Typed { type: TypeDesc { name: 'List0', typecode: 69, width: 0, category: 1, create: { [Function] typecode: 69 } }, value: [], descriptor: { [Number: 112] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 112 } }
2018-07-17T06:13:00.610Z rhea:message Encoding section 2 of 5: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 113] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 113 } }
2018-07-17T06:13:00.610Z rhea:message Encoding section 3 of 5: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 114] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 114 } }
2018-07-17T06:13:00.610Z rhea:message Encoding section 4 of 5: Typed { type: TypeDesc { name: 'List32', typecode: 208, width: 4, category: 3, create: { [Function] typecode: 208 } }, value: [ Typed { type: [Object], value: '2150868a-b2ab-40cb-8028-70552e4eb6e9' } ], descriptor: { [Number: 115] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 115 } }
2018-07-17T06:13:00.610Z rhea:message Encoding section 5 of 5: Typed { type: TypeDesc { name: 'Vbin32', typecode: 176, width: 4, category: 2, create: { [Function] typecode: 176 } }, value: <Buffer 22 7b 5c 22 6c 61 74 69 74 75 64 65 5c 22 3a 35 30 2c 5c 22 6c 6f 6e 67 69 74 75 64 65 5c 22 3a 34 30 2c 5c 22 74 69 6d 65 73 74 61 6d 70 5c 22 3a 31 ... >, descriptor: { [Number: 117] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 117 } }
2018-07-17T06:13:00.610Z rhea:message encoded 353 bytes
2018-07-17T06:13:00.611Z rhea:message Encoding section 1 of 4: Typed { type: TypeDesc { name: 'List0', typecode: 69, width: 0, category: 1, create: { [Function] typecode: 69 } }, value: [], descriptor: { [Number: 112] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 112 } }
2018-07-17T06:13:00.611Z rhea:message Encoding section 2 of 4: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 114] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 114 } }
2018-07-17T06:13:00.611Z rhea:message Encoding section 3 of 4: Typed { type: TypeDesc { name: 'List32', typecode: 208, width: 4, category: 3, create: { [Function] typecode: 208 } }, value: [ Typed { type: [Object], value: '2150868a-b2ab-40cb-8028-70552e4eb6e9' } ], descriptor: { [Number: 115] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 115 } }
2018-07-17T06:13:00.611Z rhea:message Encoding section 4 of 4: Typed { type: TypeDesc { name: 'Vbin32', typecode: 176, width: 4, category: 2, create: { [Function] typecode: 176 } }, value: <Buffer 00 53 70 45 00 53 71 d1 00 00 00 04 00 00 00 00 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 32 31 35 30 38 36 38 61 ... >, descriptor: { [Number: 117] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 117 } }
2018-07-17T06:13:00.611Z rhea:message encoded 427 bytes
2018-07-17T06:13:00.611Z azure:event-hubs:sender [connection-1]Sender '6f16761e-99aa-4a45-b38a-5c26c2ca12f4', sending encoded batch message. <Buffer 00 53 70 45 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 32 31 35 30 38 36 38 61 2d 62 32 61 62 2d 34 30 63 62 2d 38 ... >
2018-07-17T06:13:00.612Z azure:amqp-common:retry Retry attempt number: 1
2018-07-17T06:13:00.612Z azure:event-hubs:sender [connection-1] Sender '6f16761e-99aa-4a45-b38a-5c26c2ca12f4', credit: 994 available: 2042
2018-07-17T06:13:00.612Z azure:event-hubs:sender [connection-1] Sender '6f16761e-99aa-4a45-b38a-5c26c2ca12f4', sending message: <Buffer 00 53 70 45 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 32 31 35 30 38 36 38 61 2d 62 32 61 62 2d 34 30 63 62 2d 38 ... >
2018-07-17T06:13:00.612Z azure:event-hubs:sender [connection-1] Sender '6f16761e-99aa-4a45-b38a-5c26c2ca12f4', sent message with delivery id: 6 and tag: 2150868a-b2ab-40cb-8028-70552e4eb6e9
2018-07-17T06:13:00.613Z rhea:events Connection got event: disconnected
2018-07-17T06:13:00.613Z azure:event-hubs:connectionContext [connection-1] connection.close() was not called from the sdk and there were some sender or receiver links or both. We should reconnect.
2018-07-17T06:13:00.613Z rhea:frames [connection-1]:5 -> transfer#14 {"delivery_id":6,"delivery_tag":"2150868a-b2ab-40cb-8028-70552e4eb6e9","message_format":2147563264} <Buffer 00 53 70 45 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 32 31 35 30 38 36 38 61 2d 62 32 61 62 2d 34 30 63 62 2d 38 ... >
2018-07-17T06:13:00.613Z rhea:raw [connection-1] SENT: 495 00000 ...
2018-07-17T06:13:00.913Z azure:event-hubs:connectionContext [connection-1] calling detached on sender '6f16761e-99aa-4a45-b38a-5c26c2ca12f4' with address 'test-hub/Partitions/0'.
2018-07-17T06:13:00.914Z azure:event-hubs:sender [connection-1] close() method of Sender '6f16761e-99aa-4a45-b38a-5c26c2ca12f4' with address 'test-hub/Partitions/0' was not called. There was no accompanying error as well. This is a candidate for re-establishing the sender link.
2018-07-17T06:13:00.914Z azure:event-hubs:sender Creating sender with options: { name: '75333c43-0139-4a2c-bf00-80523282956d',
  target: { address: 'test-hub/Partitions/0' },
  onError: [Function],
  onClose: [AsyncFunction] }
2018-07-17T06:13:00.915Z azure:amqp-common:retry Retry attempt number: 1
2018-07-17T06:13:00.916Z azure:amqp-common:retry Success, after attempt number: 1.
2018-07-17T06:13:00.916Z azure:amqp-common:retry Success result: undefined
2018-07-17T06:13:30.607Z azure:event-hubs:sender [connection-1] Sender '75333c43-0139-4a2c-bf00-80523282956d', trying to send EventData[].
2018-07-17T06:13:30.608Z azure:amqp-common:datatransformer [encode] The given message body that needs to be encoded is:  {...}
2018-07-17T06:13:30.608Z azure:amqp-common:datatransformer [encode] The encoded message body is: Section {
  typecode: 117,
  content: <Buffer 22 7b 5c 22 6c 61 74 69 74 75 64 65 5c 22 3a 33 31 2c 5c 22 6c 6f 6e 67 69 74 75 64 65 5c 22 3a 37 35 2c 5c 22 74 69 6d 65 73 74 61 6d 70 5c 22 3a 31 ... >,
  multiple: undefined }.
2018-07-17T06:13:30.608Z azure:amqp-common:datatransformer [encode] The given message body that needs to be encoded is:  {...}
2018-07-17T06:13:30.609Z azure:amqp-common:datatransformer [encode] The encoded message body is: Section {
  typecode: 117,
  content: <Buffer 22 7b 5c 22 6c 61 74 69 74 75 64 65 5c 22 3a 33 31 2c 5c 22 6c 6f 6e 67 69 74 75 64 65 5c 22 3a 37 35 2c 5c 22 74 69 6d 65 73 74 61 6d 70 5c 22 3a 31 ... >,
  multiple: undefined }.
2018-07-17T06:13:30.609Z azure:amqp-common:datatransformer [encode] The given message body that needs to be encoded is:  {...}
2018-07-17T06:13:30.609Z azure:amqp-common:datatransformer [encode] The encoded message body is: Section {
  typecode: 117,
  content: <Buffer 22 7b 5c 22 6c 61 74 69 74 75 64 65 5c 22 3a 33 31 2c 5c 22 6c 6f 6e 67 69 74 75 64 65 5c 22 3a 37 35 2c 5c 22 74 69 6d 65 73 74 61 6d 70 5c 22 3a 31 ... >,
  multiple: undefined }.
2018-07-17T06:13:30.610Z rhea:message Encoding section 1 of 5: Typed { type: TypeDesc { name: 'List0', typecode: 69, width: 0, category: 1, create: { [Function] typecode: 69 } }, value: [], descriptor: { [Number: 112] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 112 } }
2018-07-17T06:13:30.610Z rhea:message Encoding section 2 of 5: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 113] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 113 } }
2018-07-17T06:13:30.610Z rhea:message Encoding section 3 of 5: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 114] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 114 } }
2018-07-17T06:13:30.610Z rhea:message Encoding section 4 of 5: Typed { type: TypeDesc { name: 'List32', typecode: 208, width: 4, category: 3, create: { [Function] typecode: 208 } }, value: [ Typed { type: [Object], value: '7a2d8a3c-2ad4-4796-bfd3-7e519b6604e7' } ], descriptor: { [Number: 115] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 115 } }
2018-07-17T06:13:30.610Z rhea:message Encoding section 5 of 5: Typed { type: TypeDesc { name: 'Vbin32', typecode: 176, width: 4, category: 2, create: { [Function] typecode: 176 } }, value: <Buffer 22 7b 5c 22 6c 61 74 69 74 75 64 65 5c 22 3a 33 31 2c 5c 22 6c 6f 6e 67 69 74 75 64 65 5c 22 3a 37 35 2c 5c 22 74 69 6d 65 73 74 61 6d 70 5c 22 3a 31 ... >, descriptor: { [Number: 117] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 117 } }
2018-07-17T06:13:30.610Z rhea:message encoded 353 bytes
2018-07-17T06:13:30.611Z rhea:message Encoding section 1 of 5: Typed { type: TypeDesc { name: 'List0', typecode: 69, width: 0, category: 1, create: { [Function] typecode: 69 } }, value: [], descriptor: { [Number: 112] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 112 } }
2018-07-17T06:13:30.611Z rhea:message Encoding section 2 of 5: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 113] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 113 } }
2018-07-17T06:13:30.611Z rhea:message Encoding section 3 of 5: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 114] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 114 } }
2018-07-17T06:13:30.611Z rhea:message Encoding section 4 of 5: Typed { type: TypeDesc { name: 'List32', typecode: 208, width: 4, category: 3, create: { [Function] typecode: 208 } }, value: [ Typed { type: [Object], value: '804c2328-8458-4285-aafb-98a97cc8553f' } ], descriptor: { [Number: 115] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 115 } }
2018-07-17T06:13:30.611Z rhea:message Encoding section 5 of 5: Typed { type: TypeDesc { name: 'Vbin32', typecode: 176, width: 4, category: 2, create: { [Function] typecode: 176 } }, value: <Buffer 22 7b 5c 22 6c 61 74 69 74 75 64 65 5c 22 3a 33 31 2c 5c 22 6c 6f 6e 67 69 74 75 64 65 5c 22 3a 37 35 2c 5c 22 74 69 6d 65 73 74 61 6d 70 5c 22 3a 31 ... >, descriptor: { [Number: 117] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 117 } }
2018-07-17T06:13:30.611Z rhea:message encoded 353 bytes
2018-07-17T06:13:30.611Z rhea:message Encoding section 1 of 5: Typed { type: TypeDesc { name: 'List0', typecode: 69, width: 0, category: 1, create: { [Function] typecode: 69 } }, value: [], descriptor: { [Number: 112] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 112 } }
2018-07-17T06:13:30.612Z rhea:message Encoding section 2 of 5: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 113] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 113 } }
2018-07-17T06:13:30.612Z rhea:message Encoding section 3 of 5: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 114] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 114 } }
2018-07-17T06:13:30.612Z rhea:message Encoding section 4 of 5: Typed { type: TypeDesc { name: 'List32', typecode: 208, width: 4, category: 3, create: { [Function] typecode: 208 } }, value: [ Typed { type: [Object], value: 'd0140ffe-d7d2-43c6-80a5-b6cba57c906d' } ], descriptor: { [Number: 115] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 115 } }
2018-07-17T06:13:30.612Z rhea:message Encoding section 5 of 5: Typed { type: TypeDesc { name: 'Vbin32', typecode: 176, width: 4, category: 2, create: { [Function] typecode: 176 } }, value: <Buffer 22 7b 5c 22 6c 61 74 69 74 75 64 65 5c 22 3a 33 31 2c 5c 22 6c 6f 6e 67 69 74 75 64 65 5c 22 3a 37 35 2c 5c 22 74 69 6d 65 73 74 61 6d 70 5c 22 3a 31 ... >, descriptor: { [Number: 117] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 117 } }
2018-07-17T06:13:30.612Z rhea:message encoded 353 bytes
2018-07-17T06:13:30.612Z rhea:message Encoding section 1 of 6: Typed { type: TypeDesc { name: 'List0', typecode: 69, width: 0, category: 1, create: { [Function] typecode: 69 } }, value: [], descriptor: { [Number: 112] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 112 } }
2018-07-17T06:13:30.613Z rhea:message Encoding section 2 of 6: Typed { type: TypeDesc { name: 'Map32', typecode: 209, width: 4, category: 3, create: { [Function] typecode: 209 } }, value: [], descriptor: { [Number: 114] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 114 } }
2018-07-17T06:13:30.613Z rhea:message Encoding section 3 of 6: Typed { type: TypeDesc { name: 'List32', typecode: 208, width: 4, category: 3, create: { [Function] typecode: 208 } }, value: [ Typed { type: [Object], value: '7a2d8a3c-2ad4-4796-bfd3-7e519b6604e7' } ], descriptor: { [Number: 115] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 115 } }
2018-07-17T06:13:30.613Z rhea:message Encoding section 4 of 6: Typed { type: TypeDesc { name: 'Vbin32', typecode: 176, width: 4, category: 2, create: { [Function] typecode: 176 } }, value: <Buffer 00 53 70 45 00 53 71 d1 00 00 00 04 00 00 00 00 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 37 61 32 64 38 61 33 63 ... >, descriptor: { [Number: 117] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 117 } }
2018-07-17T06:13:30.613Z rhea:message Encoding section 5 of 6: Typed { type: TypeDesc { name: 'Vbin32', typecode: 176, width: 4, category: 2, create: { [Function] typecode: 176 } }, value: <Buffer 00 53 70 45 00 53 71 d1 00 00 00 04 00 00 00 00 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 38 30 34 63 32 33 32 38 ... >, descriptor: { [Number: 117] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 117 } }
2018-07-17T06:13:30.613Z rhea:message Encoding section 6 of 6: Typed { type: TypeDesc { name: 'Vbin32', typecode: 176, width: 4, category: 2, create: { [Function] typecode: 176 } }, value: <Buffer 00 53 70 45 00 53 71 d1 00 00 00 04 00 00 00 00 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 64 30 31 34 30 66 66 65 ... >, descriptor: { [Number: 117] type: TypeDesc { name: 'SmallUlong', typecode: 83, width: 1, category: 1, read: [Function: read], write: [Function: write], create: [Object] }, value: 117 } }
2018-07-17T06:13:30.613Z rhea:message encoded 1149 bytes
2018-07-17T06:13:30.614Z azure:event-hubs:sender [connection-1]Sender '75333c43-0139-4a2c-bf00-80523282956d', sending encoded batch message. <Buffer 00 53 70 45 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 37 61 32 64 38 61 33 63 2d 32 61 64 34 2d 34 37 39 36 2d 62 ... >
2018-07-17T06:13:30.614Z azure:amqp-common:retry Retry attempt number: 1
2018-07-17T06:13:30.614Z azure:event-hubs:sender [connection-1] Sender '75333c43-0139-4a2c-bf00-80523282956d', credit: 993 available: 2041
2018-07-17T06:13:30.614Z azure:event-hubs:sender [connection-1] Sender '75333c43-0139-4a2c-bf00-80523282956d', sending message: <Buffer 00 53 70 45 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 37 61 32 64 38 61 33 63 2d 32 61 64 34 2d 34 37 39 36 2d 62 ... >
2018-07-17T06:13:30.614Z azure:event-hubs:sender [connection-1] Sender '75333c43-0139-4a2c-bf00-80523282956d', sent message with delivery id: 7 and tag: 7a2d8a3c-2ad4-4796-bfd3-7e519b6604e7
2018-07-17T06:13:30.615Z rhea:events Connection got event: disconnected
2018-07-17T06:13:30.615Z azure:event-hubs:connectionContext [connection-1] connection.close() was not called from the sdk and there were some sender or receiver links or both. We should reconnect.
2018-07-17T06:13:30.616Z rhea:frames [connection-1]:5 -> transfer#14 {"delivery_id":7,"delivery_tag":"7a2d8a3c-2ad4-4796-bfd3-7e519b6604e7","message_format":2147563264} <Buffer 00 53 70 45 00 53 72 d1 00 00 00 04 00 00 00 00 00 53 73 d0 00 00 00 2a 00 00 00 01 a1 24 37 61 32 64 38 61 33 63 2d 32 61 64 34 2d 34 37 39 36 2d 62 ... >
2018-07-17T06:13:30.616Z rhea:raw [connection-1] SENT: 1217 00000 ...
2018-07-17T06:13:30.916Z azure:event-hubs:connectionContext [connection-1] calling detached on sender '75333c43-0139-4a2c-bf00-80523282956d' with address 'test-hub/Partitions/0'.
2018-07-17T06:13:30.916Z azure:event-hubs:sender [connection-1] close() method of Sender '75333c43-0139-4a2c-bf00-80523282956d' with address 'test-hub/Partitions/0' was not called. There was no accompanying error as well. This is a candidate for re-establishing the sender link.
2018-07-17T06:13:30.916Z azure:event-hubs:sender Creating sender with options: { name: '5035c619-1257-4e9e-a24a-65b9ed0cd289',
  target: { address: 'test-hub/Partitions/0' },
  onError: [Function],
  onClose: [AsyncFunction] }
2018-07-17T06:13:30.916Z azure:amqp-common:retry Retry attempt number: 1
2018-07-17T06:13:30.917Z azure:amqp-common:retry Success, after attempt number: 1.
2018-07-17T06:13:30.917Z azure:amqp-common:retry Success result: undefined
amarzavery commented 6 years ago

FYI, You can set the environment variable like this

export DEBUG=azure*,rhea*,-rhea:raw,-rhea:message,-azure:amqp-common:datatransformer

This will not log the message and data transformer encoding statements which tend to be boring and consume lot of lines in the current situation. I just learnt this from running my long running tests where I was more interested in the error events and the raw frames.

Something does not look right.

At

2018-07-17T06:13:00.613Z rhea:events Connection got event disconnected.

SDK detected that this is a case to bring it back up.

2018-07-17T06:13:00.613Z azure:event-hubs:connectionContext [connection-1] connection.close() was not called from the sdk and there were some sender or receiver links or both. We should reconnect.
2018-07-17T06:13:00.913Z azure:event-hubs:connectionContext [connection-1] calling detached on sender '6f16761e-99aa-4a45-b38a-5c26c2ca12f4' with address 'test-hub/Partitions/0'.
2018-07-17T06:13:00.914Z azure:event-hubs:sender [connection-1] close() method of Sender '6f16761e-99aa-4a45-b38a-5c26c2ca12f4' with address 'test-hub/Partitions/0' was not called. There was no accompanying error as well. This is a candidate for re-establishing the sender link.

Ahh and now I see the bug... I just saw the log statement from retry function that the attempt was successful. Ideally, we would have seen debug statements from rhea, where it would re-establish the sender links.. This does not happen because, I am checking whether the sender is open or not over here and the _init() is called from detached method here.

2018-07-17T06:13:00.916Z azure:amqp-common:retry Success, after attempt number: 1.

So even though the connection receives the disconnected event, the sender and receiver link in rhea still think that they are open. @grs - What do you think about this? /cc @princjef

MatejSkrbis commented 6 years ago

I have tried running over night again with those debug options you posted. This time the connection was still functional and no rhea:events Connection got event: disconnected were seen in logs. So generally it seems as it's working but there might be an edge case that is causing this disconnection events.

amarzavery commented 6 years ago

I see. Shall keep the issue open for now. Will monitor it in my tests to see if I can repro this.

What I fail to understand from the previous logs is:

grs commented 6 years ago

At present the 'open' state of links, sessions and connections is tracking whether the endpoint was closed at the AMQP level, and is distinct from disconnected. That state is then used to determine whether to re-establish on reconnect.

However I have committed a change that alters this (see https://github.com/amqp/rhea/issues/101) such that is_open() is always false when disconnected (and the desired state is tracked separately).

amarzavery commented 6 years ago

@MatejSkrbis - The edge case should have been fixed. I made some minor updates in the sdk and @grs helped in fixing the issue in the protocol library by ensuring that the state of the sender/receiver is closed, once the connection receives the "disconnected" event. I have merged the PR to the master branch. Feel free to pull the latest updates from master and test the new bits.

amarzavery commented 6 years ago

This issue has been resolved. Hence closing it. A new version with updated changes will be published shortly.

ghost commented 6 years ago

In which release will this patch get merged? If not, already done..

Also,, what are the detailed instructions to download this patch include it in my project? I saw the instructions to build the package.. should I just copy the files into my project there after?

amarzavery commented 6 years ago

@sharath-srinivasan - This issue has been fixed. Please install the latest version of "azure-event-hubs". npm install azure-event-hubs should install 0.2.7 version of the package. This should have the fix in it. If the issue persists, then please feel free to open another issue.