sinus wrote:
> 
> Hello to everybody. I need a help. During 3 days I'm trying to solve a
> problem that appears with my embedded pub/sub(with listener) model after
> processing around 80000 messages.
> So, all goes well: publishing and consumig , but after  ~ 80000 messages
> the threads of my multi-theaded application block in
> connection.createSession(false, Session.AUTO_ACKNOWLEDGE) method. I
> noticed that at that moment i can not event make a ping to google.com.Some
> code that manege jms:
> 
> BrokerService broker = new BrokerService();
> broker.setUseJmx(false);
> broker.setPersistent(false);
> broker.getSystemUsage().setSendFailIfNoSpace(true);
> broker.addConnector("vm://jms");
> broker.start();
> 
> send process:
>           ActiveMQConnectionFactory connectionFactory= null;
>             String user = ActiveMQConnection.DEFAULT_USER;
>             String password = ActiveMQConnection.DEFAULT_PASSWORD;
>             connectionFactory= new ActiveMQConnectionFactory(user,
> password, "vm://jms");
>             connectionFactory.setUseAsyncSend(true);
>             connectionFactory.setCopyMessageOnSend(false);
>             Connection con = connectionFactory.createConnection();
>             con.start();
>             session = connection.createSession(false,
> Session.AUTO_ACKNOWLEDGE);
>             
>            topic = session.createTopic("myTopic"));
>             producer = session.createProducer(topic);
>             producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
>             message = session.createObjectMessage(ticket); 
>            producer.send(message);
> 
> ActiveMQ 5.2  
>  So, I'm using a connection for all my threads of my application> Each
> thread creates its own session and the object that it need to send the
> message. All the clean is done well( close session, publisher, etc.).
> What can be the problem ???Can you help me please? Its really blocking for
> me. Please. Thanks.
> Serge.
> 
> 
> 
>         
> 

i have some kind an similar architecture  an multithreded server that puts
data in JMS Queue to use is as a giant buffer for slow data treatment.
After a while ~ N number of messages all my workers (pooled threads) are
blocked on the method 
create jms session on the way to put data in jms Queue 
connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
as a result server doesn't respond any more to the new requests throwing 
RejectedExecutionException 
please help , why does it stops creating new jms sessions ?

did i use an wrong architecture using the same connection object and
creating -closing session after each task?
I assume that i 'm closing any used resource (connections ,sockets) ?
Any help will be appreciated.



-- 
View this message in context: 
http://www.nabble.com/createSession%28%29-makes-all-the-threads-to-wait-...-tp24916480p24920005.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to