It's not clear to me whether or not you still need help. Are you getting the behavior you want at this point?
Justin On Fri, Mar 18, 2022 at 7:59 AM DEEPTHI KOLLIPARA <deepthi.kollip...@tcs.com.invalid> wrote: > Hi, > > If I use single connectionfactory for all the queues, queues are not > running in parallel, but records are processing fast with ha=true. > So, we have created a connectionfactory for each queue then queues are not > processing fast. We are using Spring JMS API to send/receive the messages. > > Below is the code snippet for sending the messages. > > ConnectionFactory connectionFactory = QueueProvider > > .getConnectionFactory(transactionType); > JmsTemplate jmsTemplate = new > JmsTemplate(connectionFactory); > > jmsTemplate.setSessionAcknowledgeMode(Session.CLIENT_ACKNOWLEDGE); > jmsTemplate.setDeliveryPersistent(true); > jmsTemplate.setExplicitQosEnabled(true); > jmsTemplate.setDeliveryMode(DEL_MODE); > jmsTemplate.setPriority(priority); > jmsTemplate.send(destination, new > TextMessageCreator(transactionType, response,corelationId)); > jmsTemplate.afterPropertiesSet(); > > public static ActiveMQConnectionFactory getConnectionFactory(String > queuename) throws JMSException { > final JMSProperties properties = > JMSProperties.getInstance(); > > if( actMQConnFactory1.get(queuename) !=null) { > return actMQConnFactory1.get(queuename); > }else { > return getConnectionFactory1(); > } > } > > Thanks & Regards > Deepthi Kollipara > Public Services Unit > Tata Consultancy Services Limited > > > > -----Original Message----- > From: DEEPTHI KOLLIPARA > Sent: Thursday, March 17, 2022 7:13 PM > To: users@activemq.apache.org > Subject: RE: Artemis - High Availability Replica mode > > Dear Justin, > > Thank you for the reply. > Connections are creating for each time when a message is sent or received. > We have seen the performance improvement after modifying the code. > > When master is down, application is connecting to the slave and records > are processed. But again if master is up, application is not able to make a > connection to the master and application needs a restart to process the > records again. > > We are creating the queues runtime and they may run in parallel. Is there > any way to create pool of connections and application can make a connection > using the available connection in the pool. > > Please suggest. > > Thanks & Regards > Deepthi Kollipara > > > > -----Original Message----- > From: Justin Bertram <jbert...@apache.org> > Sent: Wednesday, March 16, 2022 10:32 PM > To: users@activemq.apache.org > Subject: Re: Artemis - High Availability Replica mode > > "External email. Open with Caution" > > How you create the connection shouldn't really be an issue because you > should only be creating the connection *once* and then using that same > connection for all the work you need to do. Once the connection is > established it should work essentially the same whether you use ha=true or > not. > > Can you elaborate on how you're creating and using your connections? Are > you perhaps creating a connection every time you send or consume a message? > > > Justin > > On Wed, Mar 16, 2022 at 11:16 AM DEEPTHI KOLLIPARA < > deepthi.kollip...@tcs.com.invalid> wrote: > > > Dear Users, > > > > > > > > We are using artemis HA in replica mode with master/slave configuration. > > From the web application we are connecting to the artemis with > > org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory > > > > ActiveMQConnectionFactory actMQConnFactory = new > > ActiveMQConnectionFactory(connectionURL); > > > > where connectionURL we are providing as > > (tcp://serverIP1:61616,tcp://serverIP2:61616)?ha=true&reconnectAttempt > > s=3 > > > > Without HA mode the data is processing very fast. However, When > > pushing the data into the queue in HA mode they are processing very > > slow (almost triple the time ) > > > > > > > > If the connection URL is changed to tcp://serverIP1:61616 and artemis > > is configured as HA with replica, records are processing fast. And > > replica is created in the slave server. > > > > Issue here we have observed is records are processing slow only if we > > configure the connection URL with ha=true, otherwise it is fast even > > though artemis is configured in Master/Slave replica mode. > > > > > > > > Please advise. > > > > > > > > Thanks & Regards > > > > Deepthi Kollipara > > > > Public Services Unit > > Tata Consultancy Services Limited > > > > [image: A picture containing text, clipart Description automatically > > generated] > > > > > > > > =====-----=====-----===== > > Notice: The information contained in this e-mail message and/or > > attachments to it may contain confidential or privileged information. > > If you are not the intended recipient, any dissemination, use, review, > > distribution, printing or copying of the information contained in this > > e-mail message and/or attachments to it are strictly prohibited. If > > you have received this communication in error, please notify us by > > reply e-mail or telephone and immediately and permanently delete the > > message and any attachments. Thank you > > > > >