|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (AMQNET-159) Make failover protocol optionally asynchronously connect to socketsMake failover protocol optionally asynchronously connect to sockets
------------------------------------------------------------------- Key: AMQNET-159 URL: https://issues.apache.org/activemq/browse/AMQNET-159 Project: ActiveMQ .Net Issue Type: New Feature Components: ActiveMQ Client Affects Versions: 1.1 Environment: XP, Windows Server 2008, Sql Server 2008 Reporter: Mark Gellings Assignee: Jim Gomes Fix For: 1.1 The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. The following failover address is an example of how to use the async connect. private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Updated: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Gellings updated AMQNET-159: --------------------------------- Attachment: FailoverAsyncConnect.patch This patch removes the pre and post build events. So be sure to add those back in and let me know if anyone has any questions or would like to code review. > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ Client > Affects Versions: 1.1 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.1 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Work started: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on AMQNET-159 started by Jim Gomes. > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ Client > Affects Versions: 1.1 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.1 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Updated: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jim Gomes updated AMQNET-159: ----------------------------- Fix Version/s: (was: 1.1) 1.2 > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ Client > Affects Versions: 1.1 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.2 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Resolved: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jim Gomes resolved AMQNET-159. ------------------------------ Resolution: Fixed Applied patch from Mark Gellings. Hope I merged everything correctly. Thanks, Mark! > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ Client > Affects Versions: 1.1.0 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.2.0 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53809#action_53809 ] Mark Gellings commented on AMQNET-159: -------------------------------------- Thanks Jim! Would you recommend just pulling from trunk to pick up this change? Any implications with picking up some of the completed items on 1.2 at all??? We're looking to go to production soon with the NMS provider and ActiveMQ. > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ Client > Affects Versions: 1.1.0 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.2.0 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53955#action_53955 ] Jim Gomes commented on AMQNET-159: ---------------------------------- I'm not sure what the state of 1.2 is. A lot of development has been going on, so I can't be 100% on it. For what it's worth, the unit tests continue to pass at the same rate as previously. The 1.2 trunk is allowed to be in a state of flux since that is our active development branch. So the best I can offer is, try it and see if it works for you. We try not to break stuff. BTW, would you mind reviewing the merge that I did. It got pretty hairy at times, so I would appreciate a review. Thanks. > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ Client > Affects Versions: 1.1.0 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.2.0 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Reopened: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Gellings reopened AMQNET-159: ---------------------------------- I reviewed the changes and found one difference. In FailoverTrasport.doConnect() if(_asyncConnect) { // now wait for transport to be populated, but timeout eventually allDone.WaitOne(_asyncTimeout, false); } you are passing false into an overloaded WaitOne method. I was not using this method. I wasn't passing in false just _asyncTimeout. Is there a specific reason this was done? If so, how come? If not, what are the implications of this? Also, would it make sense to make the async connection the default behavior? > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ > Affects Versions: 1.1.0 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.2.0 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55024#action_55024 ] Timothy Bish commented on AMQNET-159: ------------------------------------- According to the docs the two arg version with a value of false is the same as calling the one arg version, and the two arg version is supported on a broader range of .NET version so that's most likely the reason it was used instead. > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ > Affects Versions: 1.1.0 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.2.0 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55031#action_55031 ] Mark Gellings commented on AMQNET-159: -------------------------------------- Okay. Thanks Timothy. Last question is whether to make this the default behavior then. Should it be opt in or opt out? Originally I thought opt in so as not to modify the default behavior of NMS ActiveMQ, but I don't see why anyone wouldn't want the provider to be faster connecting to the master broker when using the failover protocol. > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ > Affects Versions: 1.1.0 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.2.0 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Commented: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55037#action_55037 ] Timothy Bish commented on AMQNET-159: ------------------------------------- Personally I'd rather leave it as is since this is new functionality and needs more testing. Also I'd rather not change behaviour on users who've already deployed NMS in production apps. > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ > Affects Versions: 1.1.0 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.2.0 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
|
[jira] Resolved: (AMQNET-159) Make failover protocol optionally asynchronously connect to sockets[ https://issues.apache.org/activemq/browse/AMQNET-159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Timothy Bish resolved AMQNET-159. --------------------------------- Resolution: Fixed Left as implemented. > Make failover protocol optionally asynchronously connect to sockets > ------------------------------------------------------------------- > > Key: AMQNET-159 > URL: https://issues.apache.org/activemq/browse/AMQNET-159 > Project: ActiveMQ .Net > Issue Type: New Feature > Components: ActiveMQ > Affects Versions: 1.1.0 > Environment: XP, Windows Server 2008, Sql Server 2008 > Reporter: Mark Gellings > Assignee: Jim Gomes > Fix For: 1.2.0 > > Attachments: FailoverAsyncConnect.patch > > > The current failover transport synchronously attempts to socket connect to a broker. Preferably we would first socket connect trying the master address in the failover address to avoid a socket connection timeout. When the first tcp address in the failover address is the slave, its connectors are not started, and .NET takes around 20 - 25s to timeout trying to socket connect to the slave. Thus the client is waiting 20-25s to submit a message when the session is first established. > Since the first tcp address in the failover address is never guaranteed to be the master, I've coded an enhancement that optionally allows to asynchronously socket connect utilizing all the tcp addresses in the failover address. I have a patch you can apply. > The following failover address is an example of how to use the async connect. > private static Uri _uri = new Uri("failover:(tcp://WAMQDEV1.qg.com:10083,tcp://SXMQDEV1.qg.com:10083)?AsyncConnect=true&AsyncTimeout=20000"); > This will cause the failover transport to attempt connecting to WAMQDEV1 and SXMQDEV1 at the same time to avoid the impact of any socket connect timeouts. First broker connected to becomes the transport utilized. If WAMQDEV1 broker is not running or is running the slave broker then if SXMQDEV1 is running the master broker the client will connect to SXMQDEV1. > AsyncTimeout is the max time in milliseconds to wait for a transport to be initialized. So if both brokers are down, in the example above, after 20000 milliseconds the normal retry logic will kick in. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
| Free embeddable forum powered by Nabble | Forum Help |