Closed ryanvm closed 7 years ago
@mateodelnorte Do you have any objections with this approach? Any chance I can get this PR merged in?
Hey @ryanvm. I'll take a look now. Thanks for the PR.
Thanks, again, @ryanvm. Looks like you can do the same behavior without needing a passEvent
function and instead just using bind. I'm going to update your code to do that, and also use a dot notation for the child events, like so:
conn.on('close', self.emit.bind(self, 'connection.close'));
conn.on('error', self.emit.bind(self, 'connection.error'));
merged with above changes, and published to servicebus@2.0.8
Thanks!
Awesome. Thanks!
This PR adds support for passing through the following additional events:
channel:close
connection:close
connection:error
This allows users of
servicebus
to respond proactively to connectivity disruptions rather than wait untilsend()
orpublish()
calls start failing.There are additional events that may be worth passing through (
connection:block
,connection:unblock
,channel:return
,channel:drain
), but I don't have a use case for them, so have not included them at this time.