Skip to content

Conversation

@ScottMorse
Copy link

At approximately 7:30 AM EST about every day, the connection to IBM Message Hub (now called Event Stream?) is broken. I created this pull request in order to handle this specifically for the Message Hub consumer.

The events of this disconnection happen as follows in regards to this node and its dependencies:

  1. The consumer instance begins to fail to get the topic requested.
  2. If the above problem is not resolved, it will simply return this error endlessly until the connection is reset manually.
  3. If the above problem is resolved through reconnection within the code itself, a subsequent problem is that the connection may hang endlessly when creating the consumer before topics can be received.

My solution in this pull request is as follows:

  1. For the topic errors and for the consumer creation errors, there will be a retry timeout of one minute to restart the process of connecting to IBM message hub.
  2. If creating the consumer takes too long, once again there will be a reconnection timeout, since often the instance gets stuck at some point, unable to receive any kind of HTTP response from IBM during the daily disconnect.
  3. This timeout will be cleared if the node is closed.
  4. The topic loop is closed if there is an error receiving topics before retrying a connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant