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

Why some parameters of failover are comments? #22

Closed
Feng23 opened this issue Mar 17, 2014 · 1 comment
Closed

Why some parameters of failover are comments? #22

Feng23 opened this issue Mar 17, 2014 · 1 comment
Labels

Comments

@Feng23
Copy link

Feng23 commented Mar 17, 2014

I tried to use failover:(xxx)?timeout=xxx, but the stompest does not support this. Then I read the source code and found that some transport options are commented out in src/core/stompest/protocol/failover.py

    _SUPPORTED_OPTIONS = { 
        'initialReconnectDelay': _configurationOption(int, 10) 
        , 'maxReconnectDelay': _configurationOption(int, 30000)
        , 'useExponentialBackOff': _configurationOption(_bool, True)
        , 'backOffMultiplier': _configurationOption(float, 2.0)
        , 'maxReconnectAttempts': _configurationOption(int, -1) 
        , 'startupMaxReconnectAttempts': _configurationOption(int, 0)
        , 'reconnectDelayJitter': _configurationOption(int, 0)
        , 'randomize': _configurationOption(_bool, True)
        , 'priorityBackup': _configurationOption(_bool, False)
        #, 'backup': _configurationOption(_bool, False), # initialize and hold a second transport connection - to enable fast failover
        #, 'timeout': _configurationOption(int, -1), # enables timeout on send operations (in miliseconds) without interruption of reconnection process
        #, 'trackMessages': _configurationOption(_bool, False), # keep a cache of in-flight messages that will flushed to a broker on reconnect
        #, 'maxCacheSize': _configurationOption(int, 131072), # size in bytes for the cache, if trackMessages is enabled
        #, 'updateURIsSupported': _configurationOption(_bool, True), # determines whether the client should accept updates to its list of known URIs from the connected broker
    } 

The param timeout just be commented out.
I did not find the reasons about this.
Could someone help me explain it ?

@nikipore
Copy link
Owner

When I wrote the first version of a failover behavior, I copied the failover options from the ActiveMQ website (commented out) and began to implement those I needed most and could make sense of in a client-independent way.

It didn't immediately occur to me as to how one would implement the options which are still commented out in a way which is client-independent (sync, async). Plus, I didn't really need them, so never looked back. If you wish to improve the coverage of failover options, please feel free to open a ticket and/or contribute yourself, be it with code or suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants