We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Due to the documentation here, I assume that i get an error as timeout or ?
What i need to do is terminate the message when time is out.
I tried the following configuration which not sure if I set it up correctly OR understand timeout correctly!
timeout
Sender
hydraExpress.init(HydraConfig, () => { const from = `${hydra.getServiceName()}@${hydra.getInstanceID()}`; const greetingMessage = hydra.createUMFMessage({ to: 'authentication-service:/', from: from, timeout: 1, body: { greeting: `Eh, braddah, ${from} here, howsit!`, }, }); let i = 1; api.get('/bus-test', (req, res) => { hydra.once('message', message => { res.send(`<pre>${JSON.stringify({count: ++i, message}, null, 4)}</pre>`); }); hydra.sendMessage(greetingMessage); }); hydraExpress.registerRoutes({ '/': api, }); });
Receiver
hydraExpress.init(HydraConfig, () => { const from = `${hydra.getServiceName()}@${hydra.getInstanceID()}`; function message() { return `ECHO ${from}, Hello!!`; } hydra.on('message', _message => { const echoMessage = hydra.createUMFMessage({ to: 'core-service:/', from: from, timeout: 1, body: { greeting: message(), }, }); setTimeout(() => { hydra.sendMessage(echoMessage); }, 3000); }); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Due to the documentation here, I assume that i get an error as timeout or ?
What i need to do is terminate the message when time is out.
I tried the following configuration which not sure if I set it up correctly OR understand
timeout
correctly!Sender
Receiver
The text was updated successfully, but these errors were encountered: