Thanks!



[rg] <https://www.redpointglobal.com/>

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>
From: Roskvist Anton <anton.roskv...@volvo.com>
Sent: Tuesday, November 8, 2022 3:35 AM
To: users@activemq.apache.org
Subject: RE: Artemis: How to make maximally resilient/retrying connection

*** [Caution] This email is from an external source. Please use caution 
responding, opening attachments or clicking embedded links. ***

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<mailto:john.lil...@redpointglobal.com.INVALID>>
Sent: den 8 november 2022 01:59
To: users@activemq.apache.org<mailto: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<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fJmsStaticConnectionPool.java%3a83&c=E,1,KvWhmbFiNG6MPP_dzhD2IssNfHT9ZAwTWENFNTyRuXEgmBYXLVuW3fwLJSgQFLpOmwhof3QNUcX9K3_q4ChK7hbniff58pIl91RlWg2slRTAlQM7lx8,&typo=1&ancr_add=1>)
        at 
net.redpoint.ipc.jms.JmsStaticConnectionPool.lambda$getConnection$0(JmsStaticConnectionPool.java:46<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fJmsStaticConnectionPool.java%3a46&c=E,1,UatVPyQwnI8HBwffm2ayLQcTaJzLCmHixSYWcGefh69lzcrJRMqeKLe09zIcgGD-dPUCXj7hZHHshkovz0-0Tiruu20-kiQaOnUoHm7NxxQ_BmLmf5cCgCeXmDE,&typo=1&ancr_add=1>)
        at 
java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fConcurrentHashMap.java%3a1708&c=E,1,ATMuVGjrPpbulcklKQW081sN8RStZqcUtXP5xOBY0g4WghkvnhnuO8loljAcvIPa9uXO_GT_qJGT2zYrIFV-EAFhqpIT9pXxGh4xuMYVYa79E-k,&typo=1&ancr_add=1>)
        at 
net.redpoint.ipc.jms.JmsStaticConnectionPool.getConnection(JmsStaticConnectionPool.java:46<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fJmsStaticConnectionPool.java%3a46&c=E,1,Fh-CVb8Yce0TtGrDcuor2i5gKWPu5TosVluo3ZL4PMsEMZvIumyyNKtEd2uPEHQyaLmQR0YxAUdpcYMiWOmDbsXGMmpLgwNSLk_EAahwFEVQYB6S&typo=1&ancr_add=1>)
        at 
net.redpoint.ipc.jms.JmsServerBase.getConnection(JmsServerBase.java:77<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fJmsServerBase.java%3a77&c=E,1,xE9jD9xhB371dGF5kqEdeZidJLw5WrtCBSA3iB39lt3unaB-a-kLToZ3jZl00Xjlh8x2UlmiPFNR0ejRdr9a8WVPC-STJNYV7K9Eu5dDB4Z3Nk0nSpL4u_x9Bg,,&typo=1&ancr_add=1>)
        at 
net.redpoint.ipc.jms.JmsServerBase.start(JmsServerBase.java:63<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fJmsServerBase.java%3a63&c=E,1,v79VEt9Av6P5_djgOI7ZZARuaIwMsIYoyIjHoIPcw8ylspCl09P_i2PfB4HlOm5Y1owfeKlleHsbnlJah_mSmAYviV62NOQiqNgzi8ft&typo=1&ancr_add=1>)
        at 
net.redpoint.ipc.servers.TopicServerBase.start(TopicServerBase.java:36<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fTopicServerBase.java%3a36&c=E,1,U_k7O-LLc-1eLxQeP-A3tI7BZVrGOplU0cOQQMINAYrOdW_LHuEF94LUdbcZsxF3T8Cvlp57M2Ml8KXeLVEXixjCkQ_A3AZony3cpKZxl-pIfKM,&typo=1&ancr_add=1>)
        at 
net.redpoint.rpdm.cache_invalidation_query.CacheInvalidationQueryServerImpl.start(CacheInvalidationQueryServerImpl.java:100<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fCacheInvalidationQueryServerImpl.java%3a100&c=E,1,i9oiZCnBcrpLs8LfgzIw2wZ3jtfWsjFQVBuQAQZFh6CHQvAbMimGi8eLiFoSJZr03GLIF1R5Ai7Zn1c4PxJChoFVn5ZOFoZkHh3gU14OK0dVYOMCvCsG&typo=1&ancr_add=1>)
        at 
net.redpoint.rpdm.combinedservice.CombinedServices.start(CombinedServices.java:75<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fCombinedServices.java%3a75&c=E,1,r5woyZIyzhptrNGwUBcr0I-0X7xuEpbnIp5F-pRn0fIPf20uP822DAmRRCIMhTNYfzcICwUtFoTqyH9pLT11zZWrU4Qwy7k3FYbSzR_KvO7HOAfD&typo=1&ancr_add=1>)
        at 
net.redpoint.rpdm.combinedservice.CombinedServices.run<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fnet.redpoint.rpdm.combinedservice.CombinedServices.run&c=E,1,PuV_QKG4jyGv_51li8RvoT8TVSoKHIAyM6-AmPe9ThLz1xcASVOfFZ8UWngubK0_Gg2b6HDrX2u3C_B59IBCkfh5_hZHvTZDz9i9v4GCoWxZ2TKl6j_eRkm6YSg,&typo=1&ancr_add=1>(CombinedServices.java:114<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fCombinedServices.java%3a114&c=E,1,Zw8rLYMuQJWVaLCv8IgYYTQdZbrcuaA2_MJxRNMx2QkQhgA1sEIXpZdRjxuFw6euPFdFo-TUAZsIgg90jB1tRHWI1j-pJRDOHMgFn0wiwhKqLeAs&typo=1&ancr_add=1>)
        at 
net.redpoint.rpdm.combinedservice.Main.main(Main.java:51<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fMain.java%3a51&c=E,1,cAZ0fWYYkSoUWzctQAKaeTecPibz7h3QdYHNbK9XI1gy_-Nzan5Sa0rTs2lzypQIfBy9QhvKF_9QlDJCSuYfoSQDm_FT9yFLphnkbBxzRAI,&typo=1&ancr_add=1>)
Caused by: javax.jms.JMSException: Failed to create session factory
        at 
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:867<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fActiveMQConnectionFactory.java%3a867&c=E,1,NrnIK-80afxAsyX-rL9v3AsQdtxyJ-IXmqygqCp_7JaG_jvgIeW_aHsDqJZYoe9JNR_83pCKxlfjvIoutpKYQABeXlHtvpOaLzDn2hoClxNC2CkxSDHAhRxZELiQ&typo=1&ancr_add=1>)
        at 
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:284<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fActiveMQConnectionFactory.java%3a284&c=E,1,vvEoO1nGRSoBFBkEKw9MOf5Mjt7Jvap9pn3xP-QA0zHnNJU0Y-zwno8Y3JIuUp6M0f_nqhbSRkOVnWaLpXxxGnWb5quFH5-dGPJErGnPL3fvPzRtrbNmPrRtYc0,&typo=1&ancr_add=1>)
        at 
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:279<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fActiveMQConnectionFactory.java%3a279&c=E,1,Vc-d9qBty8yQXx2uLjhSs4tmJmEzbXy_QMImKXKCzxDX8thkYfNQWKp29uMdVfxSWNInEGDZkLXh4ZRrZbLKiAqBDzRngMMwYR44iaKSIpYap6Gwq27BX44m2A,,&typo=1&ancr_add=1>)
        at 
net.redpoint.ipc.jms.MyConnectionFactory.createConnection(MyConnectionFactory.java:31<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fMyConnectionFactory.java%3a31&c=E,1,FE3H7vqKkRd3AVVAkGydroYYE9vJjWgpZycIbmiqv-s6Gc8U8nySRfhp9ypALZUMavKiFdXo7ZjRjsQC67rPxKOzVwOEUqOAqpkWfojT&typo=1&ancr_add=1>)
        at 
net.redpoint.ipc.jms.JmsStaticConnectionPool.makeConnection(JmsStaticConnectionPool.java:76<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fJmsStaticConnectionPool.java%3a76&c=E,1,1uwyu_ZzX_Fj2NtBJFa6x1fNwNMjyabFh9PnQaC1nJySJAsI0FbCLSQb8zvKbXQVp-tJlNTSlRbXKa0ujEXCyd8Qae2e8LjHJkG7cZqa0g,,&typo=1&ancr_add=1>)
        ... 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<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fServerLocatorImpl.java%3a703&c=E,1,cRvUhn38EFlNXbkEdJaU2KVPA2i5grFRTfZJ62S5dgFAPdPnxJGNNv_LgJzWXgsBcq9Q5IGRMH0WvaOHi5DtfBvUtQoCE6zb6OaTAiDBo5M-fg,,&typo=1&ancr_add=1>)
        at 
org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:865<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fActiveMQConnectionFactory.java%3a865&c=E,1,cWt3xgo4wwYIm4f64HLbIdt-b2ywHs2XadYw8kSYtlpmhKxTHMGgBK4x1zZ1lXce4RAHKHUiTu0YegbtQsI9ITLDmouFCQBpRjZyGS1QMF5xOlHuRBseXw,,&typo=1&ancr_add=1>)
        ... 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<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.volvogroup.com%2fen-en%2fprivacy.html&c=E,1,6lB1g5Ok1V8hWpvlZfuajQU4_n9yyBEJuIOHLw4vLFPd9resN6X-nxTZdChd5KoAZSL6CTRr_wzVcShl2NvxwPq9UDy25jYEHmjbgYLc2Q,,&typo=1&ancr_add=1>

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.

Reply via email to