-
1. Re: Netty vs InVM
maximilien Jul 6, 2010 3:37 AM (in response to maximilien)This happens only when using MDB.
I've just try using invm with core and i'm not limited.
-
2. Re: Netty vs InVM
ataylor Jul 6, 2010 4:11 AM (in response to maximilien)could you provide an easily runnable test that someone could take a look at. Also make sure you have tested with trunk.
-
3. Re: Netty vs InVM
maximilien Jul 9, 2010 5:37 AM (in response to ataylor)hi,
this this a simple example
i have a stateless session bean that just try to send 10000 messages in a queue
public void send(String text) throws Exception { ... QueueConnectionFactory cf = (QueueConnectionFactory)ic.lookup("java:/JmsXA"); jmsConnection = cf.createQueueConnection(); Session session = jmsConnection.createQueueSession(true,Session.SESSION_TRANSACTED); MessageProducer messageProducer = session.createProducer(queue); for(int i=0;i<10000;i++) { TextMessage message = session.createTextMessage(text + i); message.setStringProperty("target", "essai"); message.setStringProperty("id", "id-"+i); messageProducer.send(message); } ... }
it works configuring netty as transport type in ra.xml
... <config-property> <description>The transport type</description> <config-property-name>ConnectorClassName</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value> </config-property> <config-property> <description>The transport configuration. These values must be in the form of key=val;key=val;</description> <config-property-name>ConnectionParameters</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>host=localhost;port=5445</config-property-value> </config-property> ...
but not using invm
... <config-property> <description>The transport type</description> <config-property-name>ConnectorClassName</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</config-property-value> </config-property> <config-property> <description>The transport configuration. These values must be in the form of key=val;key=val;</description> <config-property-name>ConnectionParameters</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>server-id=0</config-property-value> </config-property> ...
with invm after 5517 messages the call to producer.send hangs
Thanks,
Maximilien
-
HQtest.rar.zip 15.4 KB
-
-
4. Re: Netty vs InVM
ataylor Jul 9, 2010 5:39 AM (in response to maximilien)can you post a thread dump?
-
5. Re: Netty vs InVM
maximilien Jul 9, 2010 8:25 AM (in response to ataylor)i got it, it's just a problem of producer window size
Thanks,
Maximilien
-
6. Re: Netty vs InVM
maximilien Jul 9, 2010 8:57 AM (in response to maximilien)is it normal there is no method setProducerWindowSize at ResourceAdapter level ?
-
7. Re: Netty vs InVM
maximilien Jul 9, 2010 10:11 AM (in response to maximilien)no luck using producerWindowSize, producer.send still hang on semaphore.acquire(credits) when setting producerWindowSize to -1
package org.hornetq.core.client.impl; ... public class ClientProducerCreditsImpl implements ClientProducerCredits ... public void acquireCredits(final int credits) throws InterruptedException { checkCredits(credits); semaphore.acquire(credits); }
-
8. Re: Netty vs InVM
maximilien Jul 9, 2010 10:35 AM (in response to maximilien)got it, it was just the default address-settings wildcard in hornetq-configuration.xml that fixes a max-size-bytes with a BLOCK policy
Have a good weekend ;-)