Hello John, I believe the parameter you are looking for is: "initialConnectAttempts=-1" in addition to what you have already configured. The default value is 0, meaning try once and throw an exception if that does not work (which is what you are seeing in your post).
Br, Anton From: John Lilley <john.lil...@redpointglobal.com.INVALID> Sent: den 8 november 2022 01:59 To: users@activemq.apache.org Subject: Artemis: How to make maximally resilient/retrying connection CAUTION: This email originated from outside of the organization. If suspicious, please report it. Greetings, I'd like to ensure maximal resilience of the broker connection, specifically: * If the Artemis broker is not running when our services start, the connection attempt hangs until the broker is available, and then returns the connection * If the Artemis broker fails while our services are running, our services consumers and producers will hang/block until the broker is available I *thought* I was doing that by using the URL tcp://localhost:61616?reconnectAttempts=-1 However, I find that the connection attempt just throws an exception java.lang.RuntimeException: Failed to create JMS connection to 'tcp://localhost:61616?reconnectAttempts=-1' at net.redpoint.ipc.jms.JmsStaticConnectionPool.makeConnection(JmsStaticConnectionPool.java:83) at net.redpoint.ipc.jms.JmsStaticConnectionPool.lambda$getConnection$0(JmsStaticConnectionPool.java:46) at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) at net.redpoint.ipc.jms.JmsStaticConnectionPool.getConnection(JmsStaticConnectionPool.java:46) at net.redpoint.ipc.jms.JmsServerBase.getConnection(JmsServerBase.java:77) at net.redpoint.ipc.jms.JmsServerBase.start(JmsServerBase.java:63) at net.redpoint.ipc.servers.TopicServerBase.start(TopicServerBase.java:36) at net.redpoint.rpdm.cache_invalidation_query.CacheInvalidationQueryServerImpl.start(CacheInvalidationQueryServerImpl.java:100) at net.redpoint.rpdm.combinedservice.CombinedServices.start(CombinedServices.java:75) at net.redpoint.rpdm.combinedservice.CombinedServices.run(CombinedServices.java:114) at net.redpoint.rpdm.combinedservice.Main.main(Main.java:51) Caused by: javax.jms.JMSException: Failed to create session factory at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:867) at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:284) at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:279) at net.redpoint.ipc.jms.MyConnectionFactory.createConnection(MyConnectionFactory.java:31) at net.redpoint.ipc.jms.JmsStaticConnectionPool.makeConnection(JmsStaticConnectionPool.java:76) ... 10 more Caused by: ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ219007: Cannot connect to server(s). Tried with all available servers.] at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:703) at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:865) ... 14 more Can someone help me understand how this is designed to work, and how best to achieve the two goals above? Thanks John [rg]<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redpointglobal.com%2F&data=05%7C01%7Canton.roskvist%40volvo.com%7C60887c93f8a945237fdd08dac12478a3%7Cf25493ae1c9841d78a330be75f5fe603%7C0%7C0%7C638034659637882048%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yGLS5mCGiCjTNTy9kc8cWwQCe0ZpG3Jk9%2FGVE6h5z38%3D&reserved=0> John Lilley Data Management Chief Architect, Redpoint Global Inc. 888 Worcester Street, Suite 200 Wellesley, MA 02482 M: +1 7209385761<tel:+1%207209385761> | john.lil...@redpointglobal.com<mailto:john.lil...@redpointglobal.com> PLEASE NOTE: This e-mail from Redpoint Global Inc. ("Redpoint") is confidential and is intended solely for the use of the individual(s) to whom it is addressed. If you believe you received this e-mail in error, please notify the sender immediately, delete the e-mail from your computer and do not copy, print or disclose it to anyone else. If you properly received this e-mail as a customer, partner or vendor of Redpoint, you should maintain its contents in confidence subject to the terms and conditions of your agreement(s) with Redpoint. This email message (including its attachments) is confidential and may contain privileged information and is intended solely for the use of the individual and/or entity to whom it is addressed. If you are not the intended recipient of this e-mail you may not disseminate, distribute or copy this e-mail (including its attachments), or any part thereof. If this e-mail is received in error, please notify the sender immediately by return e-mail and make sure that this e-mail (including its attachments), and all copies thereof, are immediately deleted from your system. Please further note that when you communicate with us via email or visit our website we process your personal data. See our privacy policy for more information about how we process it: https://www.volvogroup.com/en-en/privacy.html