Skip to content
New issue

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

How to stop retries #531

Open
slprogrp opened this issue Apr 22, 2021 · 1 comment
Open

How to stop retries #531

slprogrp opened this issue Apr 22, 2021 · 1 comment

Comments

@slprogrp
Copy link

Hi there,

I have a scenario where I need to say if the server can not be found, then use a different mode. So I publish a message when the page loads and handle the transport:up and transport:down events. I set a flag to say if transport is up or down based on which event gets raised. If transport:down is raised I start a timer and when the timer executes if the transport is not up, I need to stop trying to reach the server. I am calling:

client.disconnect();
client.disable();
client = null;

But that first message that was published keeps retrying over and over for ages.
How can I get Faye to stop trying that message?

Thanks for your time.

@jcoglan
Copy link
Collaborator

jcoglan commented Apr 22, 2021

The transport:{up,down} events are informational and should not be used to drive business logic, especially not for delivery correctness. You should take a look at the scheduler docs which explain how to override how deliveries and retries work.

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

No branches or pull requests

2 participants