Red Hat build of Node.js now offers a circuit breaker module based on an open source project opossum . This component executes asynchronous functions and monitors their execution status. When things start failing, opossum plays dead and fails fast. If you want, you can provide a fallback function to be executed when in the failure state.
Red Hat build of Node.js is offering a fully supported module for the circuit breaker capability, that means that Red Hat will address all issues that include bug fixes/patches and feature requests for this component.
Please find the Frequently Asked Questions on this circuit breaker component based on opossum. For more information, please reach out to support or leave a comment and we would be happy to provide more information.
What does it mean that this component is a fully supported module or framework?
Red Hat built the module or framework and has tested it for the functionality. Any issues reported (bugs or feature requests) can and will be addressed by Red Hat.
Please see our Node.js Module and Framework Support Policies for more information.
Would the community version still be available?
Yes, the community/upstream version of opossum would still be available and can be downloaded from the public npm registry.
How to download and install the Red Hat build of Node.js with circuit breaker add-on?
This module would need to be downloaded from the Red Hat Customer registry.
All other modules needed by the application will be downloaded from the upstream npm registry.
To do this, add a “.npmrc” file in the root directory of your application and add the following code.
Run the following command for download and install.
$ npm install @redhat/opossum
How to use circuit breaker component in my application?
Once you have downloaded the module from Red Hat Customer Registry. You can use it like any other node module. By adding the following code.
const CircuitBreaker = require(‘@redhat/opossum’)
What version of Node.js can be used with the circuit breaker component?
What is the Red Hat Customer registry?
How to check the entitlement for support?
Subscribers for Red Hat Runtimes are entitled for the full support of circuit breaker module as it is included with Red Hat build of Node.js
How to log a support case?
Our support channel are listed here
Are there any examples showcasing the use of this circuit breaker module?
Example usage of circuit breaker module can be found here
Where to find the API documentation?
The API documentation can be found at the following link
How to set up the Red Hat Customer registry?
How to get other dependencies from public npm registry?
Link to Other Node.js pages:
Opossum API documentation
Red Hat build of Node.js Supported Configurations
Red Hat build of Node.js Product page
Node.js Module and Framework Support Policies article
Red Hat support channels