Re: Pooled connection factory does not work

2016-04-11 Thread Michele
Hi,

first of all thanks a lot for your support.

I reset project configuration and it seems work fine as you can see from
screenshot attached  pooled-connection.png
<http://activemq.2283324.n4.nabble.com/file/n4710574/pooled-connection.png> 
.

I used prefetchSize=0 with this activemq.xml configuration  activemq.xml
<http://activemq.2283324.n4.nabble.com/file/n4710574/activemq.xml>  . Other
combinations of prefetchSize (1,2,...10) or memoryLimit on destination cause
Out Of Memory - Heap Space.

But, with this configuration the flow processing is very slowly. I have not
found the right balance between Producer - Consumer in Route.

What is the best practice when you have to process a large number of lines
in file and Slow Consumer passing through ActiveMQ?

My idea is: to give more priority (fastest) to Producer in order to store
all lines of file in Queue and at the same time a Slow Consumers draw from
queue (Throttling: 4msg/1s). Is it a good idea? 
Sorry, but I'm new on this concept.

Thanks a lot again.

Best Regards
Michele





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421p4710574.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Pooled connection factory does not work

2016-04-09 Thread Tim Bain
Hopefully resolving the errors you see when setting the prefetch size will
fix your problem.  If not, let us know what the behavior is with a prefetch
value of 1, 2, and 10, once that works.
On Apr 8, 2016 9:28 AM, "Michele" <michele.mazzi...@finconsgroup.com> wrote:

> Hi Tim,
>
> exactly... According to http://camel.apache.org/jms.html section
> Concurrent
> Consumin, we can configure concurrentConsumers option in one of the
> following ways:
> On the JmsComponent,
> On the endpoint URI or,
> By invoking setConcurrentConsumers() directly on the JmsEndpoint.
>
> However, I tried to add concurrentConsumers=10 as option in endpoint uri,
> but always only one works.
>
> I also tried with prefetchSize = 1 but with errors... I'm investigating.
>
> Any suggestions?
>
> Thanks in advance.
>
> Michele
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421p4710525.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: Pooled connection factory does not work

2016-04-08 Thread Michele
Hi Tim,

exactly... According to http://camel.apache.org/jms.html section Concurrent
Consumin, we can configure concurrentConsumers option in one of the
following ways:
On the JmsComponent,
On the endpoint URI or,
By invoking setConcurrentConsumers() directly on the JmsEndpoint.

However, I tried to add concurrentConsumers=10 as option in endpoint uri,
but always only one works.

I also tried with prefetchSize = 1 but with errors... I'm investigating.

Any suggestions?

Thanks in advance.

Michele






--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421p4710525.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Pooled connection factory does not work

2016-04-08 Thread Quinn Stevenson
Sorry Everyone - I missed that when reading the configs.

Thanks for pointing that out Tim - the configuration does look right.

> On Apr 7, 2016, at 10:00 PM, Tim Bain <tb...@alumni.duke.edu> wrote:
> 
> Although I've only used the string-based syntax (e.g.
> from("jms:MyQueue?concurrentConsumers=10") ) to specify the number of
> concurrent consumers when I've used Camel, I assumed that  name="concurrentConsumers" value="10"/> specified in the XML DSL would have
> the same effect.
> 
> On Thu, Apr 7, 2016 at 9:21 AM, Quinn Stevenson <qu...@pronoia-solutions.com
>> wrote:
> 
>> Looking at the Camel route, I only see once consumer on the queue - am I
>> missing something?
>> 
>> 
>> 
>>> On Apr 7, 2016, at 4:17 AM, Michele <michele.mazzi...@finconsgroup.com>
>> wrote:
>>> 
>>> Hi Tim,
>>> 
>>> sorry, but I'm a bit confused.
>>> 
>>> My use case is to create a Camel Route that it is capable:
>>> 
>>> 1. Read large number of lines in File (approx. 5)
>>> 2. Split, Process and store every line in AMQ (Simple hash map)
>>> 3. Retrieve message from queue and invoke with POST a Rest Service that
>> is
>>> bottleneck (I need to process messages stored in AMQ slowly in order to
>>> don't overload a Rest Service Interface).
>>> 
>>> 
>>>   
>>>
>>>  
>>>  
>>>  
>>>  
>>>  
>>>
>>> 
>>> 
>>> 
>>>>> uri="activemq:queue:incomingTickets?destination.consumer.prefetchSize=0"
>> />
>>>
>>> 5
>>>  >> uri="jetty:
>> http://host/rs/v1.0/ticket?jettyHttpBindingRef=CustomJettyHttpBinding;
>>> />
>>>
>>> 
>>> 
>>> I don't understand well how Producer and Consumer work on the broker. My
>>> idea is that Producer pust message in Queue and Consumer pop message from
>>> queue to dispatch. Is it right?
>>> So, I configured  a pooled connection factory to handle efficiently
>>> connections, sessions, producers and consumers.
>>> As you can see bt attached picture  pooled-connection.png
>>> <
>> http://activemq.2283324.n4.nabble.com/file/n4710461/pooled-connection.png>
>>> , why is there only one consumer that works on Queue?
>>> 
>>> I hope i was clear.
>>> 
>>> Thanks a lot again
>>> 
>>> Kind greetings
>>> 
>>> Michele
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421p4710461.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> 
>> 



Re: Pooled connection factory does not work

2016-04-07 Thread Tim Bain
Although I've only used the string-based syntax (e.g.
from("jms:MyQueue?concurrentConsumers=10") ) to specify the number of
concurrent consumers when I've used Camel, I assumed that  specified in the XML DSL would have
the same effect.

On Thu, Apr 7, 2016 at 9:21 AM, Quinn Stevenson <qu...@pronoia-solutions.com
> wrote:

> Looking at the Camel route, I only see once consumer on the queue - am I
> missing something?
>
>
>
> > On Apr 7, 2016, at 4:17 AM, Michele <michele.mazzi...@finconsgroup.com>
> wrote:
> >
> > Hi Tim,
> >
> > sorry, but I'm a bit confused.
> >
> > My use case is to create a Camel Route that it is capable:
> >
> > 1. Read large number of lines in File (approx. 5)
> > 2. Split, Process and store every line in AMQ (Simple hash map)
> > 3. Retrieve message from queue and invoke with POST a Rest Service that
> is
> > bottleneck (I need to process messages stored in AMQ slowly in order to
> > don't overload a Rest Service Interface).
> >
> > 
> >
> > 
> >   
> >   
> >   
> >   
> >   
> > 
> > 
> >
> > 
> >  > uri="activemq:queue:incomingTickets?destination.consumer.prefetchSize=0"
> />
> > 
> >  5
> >> uri="jetty:
> http://host/rs/v1.0/ticket?jettyHttpBindingRef=CustomJettyHttpBinding;
> > />
> > 
> > 
> >
> > I don't understand well how Producer and Consumer work on the broker. My
> > idea is that Producer pust message in Queue and Consumer pop message from
> > queue to dispatch. Is it right?
> > So, I configured  a pooled connection factory to handle efficiently
> > connections, sessions, producers and consumers.
> > As you can see bt attached picture  pooled-connection.png
> > <
> http://activemq.2283324.n4.nabble.com/file/n4710461/pooled-connection.png>
> > , why is there only one consumer that works on Queue?
> >
> > I hope i was clear.
> >
> > Thanks a lot again
> >
> > Kind greetings
> >
> > Michele
> >
> >
> >
> > --
> > View this message in context:
> http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421p4710461.html
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


Re: Pooled connection factory does not work

2016-04-07 Thread Quinn Stevenson
Looking at the Camel route, I only see once consumer on the queue - am I 
missing something?



> On Apr 7, 2016, at 4:17 AM, Michele <michele.mazzi...@finconsgroup.com> wrote:
> 
> Hi Tim,
> 
> sorry, but I'm a bit confused.
> 
> My use case is to create a Camel Route that it is capable:
> 
> 1. Read large number of lines in File (approx. 5)
> 2. Split, Process and store every line in AMQ (Simple hash map)
> 3. Retrieve message from queue and invoke with POST a Rest Service that is
> bottleneck (I need to process messages stored in AMQ slowly in order to
> don't overload a Rest Service Interface).
> 
> 
>
> 
>   
>   
>   
>   
>   
> 
> 
> 
> 
>  uri="activemq:queue:incomingTickets?destination.consumer.prefetchSize=0" />
> 
>  5   
>uri="jetty:http://host/rs/v1.0/ticket?jettyHttpBindingRef=CustomJettyHttpBinding;
> />
>   
> 
> 
> I don't understand well how Producer and Consumer work on the broker. My
> idea is that Producer pust message in Queue and Consumer pop message from
> queue to dispatch. Is it right?
> So, I configured  a pooled connection factory to handle efficiently
> connections, sessions, producers and consumers.
> As you can see bt attached picture  pooled-connection.png
> <http://activemq.2283324.n4.nabble.com/file/n4710461/pooled-connection.png> 
> , why is there only one consumer that works on Queue?
> 
> I hope i was clear.
> 
> Thanks a lot again
> 
> Kind greetings
> 
> Michele
> 
> 
> 
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421p4710461.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Re: Pooled connection factory does not work

2016-04-07 Thread Tim Bain
Does increasing your prefetch buffer size as described in
http://activemq.2283324.n4.nabble.com/Concurrent-consumers-td3041439.html
resolve the problem?

Tim

On Thu, Apr 7, 2016 at 4:17 AM, Michele <michele.mazzi...@finconsgroup.com>
wrote:

> Hi Tim,
>
> sorry, but I'm a bit confused.
>
> My use case is to create a Camel Route that it is capable:
>
> 1. Read large number of lines in File (approx. 5)
> 2. Split, Process and store every line in AMQ (Simple hash map)
> 3. Retrieve message from queue and invoke with POST a Rest Service that is
> bottleneck (I need to process messages stored in AMQ slowly in order to
> don't overload a Rest Service Interface).
>
> 
> 
>  
>
>
>
>
>
>  
> 
>
> 
>   uri="activemq:queue:incomingTickets?destination.consumer.prefetchSize=0" />
>  
>   5
> uri="jetty:
> http://host/rs/v1.0/ticket?jettyHttpBindingRef=CustomJettyHttpBinding;
> />
>  
> 
>
> I don't understand well how Producer and Consumer work on the broker. My
> idea is that Producer pust message in Queue and Consumer pop message from
> queue to dispatch. Is it right?
> So, I configured  a pooled connection factory to handle efficiently
> connections, sessions, producers and consumers.
> As you can see bt attached picture  pooled-connection.png
> <http://activemq.2283324.n4.nabble.com/file/n4710461/pooled-connection.png
> >
> , why is there only one consumer that works on Queue?
>
> I hope i was clear.
>
> Thanks a lot again
>
> Kind greetings
>
> Michele
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421p4710461.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: Pooled connection factory does not work

2016-04-07 Thread Michele
Hi Tim,

sorry, but I'm a bit confused.

My use case is to create a Camel Route that it is capable:

1. Read large number of lines in File (approx. 5)
2. Split, Process and store every line in AMQ (Simple hash map)
3. Retrieve message from queue and invoke with POST a Rest Service that is
bottleneck (I need to process messages stored in AMQ slowly in order to
don't overload a Rest Service Interface).



 
   
   
   
   
   
 



 
 
  5   
   http://host/rs/v1.0/ticket?jettyHttpBindingRef=CustomJettyHttpBinding;
/>
   


I don't understand well how Producer and Consumer work on the broker. My
idea is that Producer pust message in Queue and Consumer pop message from
queue to dispatch. Is it right?
So, I configured  a pooled connection factory to handle efficiently
connections, sessions, producers and consumers.
As you can see bt attached picture  pooled-connection.png
<http://activemq.2283324.n4.nabble.com/file/n4710461/pooled-connection.png> 
, why is there only one consumer that works on Queue?

I hope i was clear.

Thanks a lot again

Kind greetings

Michele



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421p4710461.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Pooled connection factory does not work

2016-04-06 Thread Tim Bain
I have no idea what you're asking.  What are you doing, what are you
expecting to happen in response, and what's actually happening instead?

Tim

On Wed, Apr 6, 2016 at 11:21 AM, Michele <michele.mazzi...@finconsgroup.com>
wrote:

> Hi everyone,
> I work with jboss fuse 6.2.0 based on Apache camel and active mq. I
> configured a pooled connection factory on queue with 10 consumers but only
> one dequeue.
>
> My setup:
> class="org.apache.activemq.ActiveMQConnectionFactory">
>
> 
>
> class="org.apache.activemq.pool.PooledConnectionFactory"
> init-method="start" destroy-method="stop">
>
>
> 
>
> class="org.apache.camel.component.jms.JmsConfiguration">
>
>
> 
>
>  class="org.apache.activemq.camel.component.ActiveMQComponent">
> 
> 
>
> And in activemq.xml I set a memory limit to limit number of messages and
> prefetch size with 0 to handle a slow consumer.
>
> Any idea?
>
> Thanks in advance
>
> Best regards
>
> Michele
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Pooled connection factory does not work

2016-04-06 Thread Michele
Hi everyone,
I work with jboss fuse 6.2.0 based on Apache camel and active mq. I
configured a pooled connection factory on queue with 10 consumers but only
one dequeue.

My setup:

   

 

   
   

 

   
   

 




And in activemq.xml I set a memory limit to limit number of messages and
prefetch size with 0 to handle a slow consumer.

Any idea?

Thanks in advance

Best regards

Michele



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Pooled-connection-factory-does-not-work-tp4710421.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.