-
1. Re: Persistence issues
ataylor Mar 6, 2013 10:52 AM (in response to raymanf)1. If I disable the persistence will it really improve latency performance?
It will improve throughput but latency is a different thing, it depends on your network vs disc speed, i.e. which is the bottle neck. best way to find out is to suck it and see.
2. If I disable persistence - clustering(HA) will still be available?
Only persistant message are saved to the shared store or replicated so you will have no HA
3. I tried to disable persistence having this tag at: hornetq-configuration.xml:
<persistence-enabled>false</persistence-enabled>
but for some reason when I am printing the incoming messages I still see the persistence label("PERSISTENT")
The messages them selves are still persistant, altho we use a fake journal so they raent really written to disc. You need to send them as non perstistant messages and then you will get the benefit of more relaxed acknowledge rules (since we arent bothered about non persistant mesages being lost)
-
2. Re: Persistence issues
raymanf Mar 6, 2013 11:48 AM (in response to ataylor)The messages them selves are still persistant, altho we use a fake journal so they raent really written to disc. You need to send them as non perstistant messages and then you will get the benefit of more relaxed acknowledge rules (since we arent bothered about non persistant mesages being lost)
So how I am going to send them as non-persistent?
thats my client:
Topic topic = HornetQJMSClient.createTopic("liquiditiyFeedTopic");
DiscoveryGroupConfiguration dc = new DiscoveryGroupConfiguration("231.7.7.7", 9876);
HornetQConnectionFactory jmsConnectionFactory = HornetQJMSClient.createConnectionFactoryWithHA(dc, JMSFactoryType.CF);
jmsConnectionFactory.setReconnectAttempts(5);
jmsConnectionFactory.getDiscoveryGroupConfiguration().setDiscoveryInitialWaitTimeout(100000);
connection = jmsConnectionFactory.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
producer = session.createProducer(topic);
TextMessage message = session.createTextMessage(msg);
producer.send(message);
thanks,
ray.
-
3. Re: Persistence issues
ataylor Mar 6, 2013 11:49 AM (in response to raymanf)producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);