You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Dominique DE VITO <do...@thalesgroup.com> on 2007/05/14 19:50:59 UTC
changing jms consumer priorities at runtime
I have some questions about defining/changing a JMS consumer's priority
inside ServiceMix.
* Priority defined at startup time
Possible through http://activemq.apache.org/consumer-priority.html ?
Is it correct ?
* Priority defined dynamically
It is not possible to change JMS consumer's priority at runtime inside SMX.
Is it correct ?
What about the following solution: exposing a "priority" field inside
JmsConfigurationMBean class and using this priority when creating a
MessageConsumer ?
Thanks.
Dominique
Re: changing jms consumer priorities at runtime
Posted by Dominique DE VITO <do...@thalesgroup.com>.
OK.
Many thanks for your quick replies !
Guillaume Nodet a écrit :
> This is my understanding, but you should ask on the ActiveMQ list
> to be sure ...
>
> On 5/14/07, Dominique DE VITO <do...@thalesgroup.com> wrote:
>>
>> I understand your response like this:
>>
>> - it's a priority defining concurrency between possible consumers of the
>> *same* messages,
>> - it's NOT a priority defining (CPU) concurrency between all the
>> consumers (then, my use case could not be implemented)
>>
>> Is it correct ?
>>
Re: changing jms consumer priorities at runtime
Posted by Guillaume Nodet <gn...@gmail.com>.
This is my understanding, but you should ask on the ActiveMQ list
to be sure ...
On 5/14/07, Dominique DE VITO <do...@thalesgroup.com> wrote:
>
> I understand your response like this:
>
> - it's a priority defining concurrency between possible consumers of the
> *same* messages,
> - it's NOT a priority defining (CPU) concurrency between all the
> consumers (then, my use case could not be implemented)
>
> Is it correct ?
>
>
> Guillaume Nodet wrote :
> > If i understand correctly, the consumer priority is only used when
> > choosing
> > a consumer
> > to dispatch the message to. It won't affect the priority between
> > messages,
> > which
> > is from what you want if I understand correctly.
> >
> > On 5/14/07, Dominique DE VITO <do...@thalesgroup.com> wrote:
> >>
> >> Yes, the priority can't be changed at runtime in ActieMQ
> >>
> >> But I think it could be done in SMX.
> >>
> >> A "queue" looks like created for *each* StandardConsumerProcessor.poll
> ()
> >> method call:
> >> destination = session.createQueue(
> endpoint.getJmsProviderDestinationName
> >> ());
> >>
> >> While changing "JmsProviderDestinationName" property value, from
> >> "TEST.QUEUE?consumer.prority=10" string value to
> >> "TEST.QUEUE?consumer.prority=20" string value, the consumer's priority
> >> might be changed, I think, inside SMX.
> >>
> >> Does it make sense ?
> >>
> >> Here is the use case:
> >> - my own business flows are from/to JMS endpoints, with various
> >> intermediate steps,
> >> - I want to modify flow priorities at business level
> >> - the simplest way I have found is to modify JMS consumer priority to
> >> change the associated business flow priority.
> >>
> >> Dominique
> >>
> >>
> >> Guillaume Nodet a écrit :
> >> > I don't think the priority can be changed at runtime in ActieMQ.
> >> > This will need to close and recreate a new consumer, i.e. stop /
> >> restart
> >> > the endpoint / SU / SA ...
> >> > Another problem is that this is an ActiveMQ specific property ...
> >> >
> >> > What's your use case for changing the consumer prioirity (and not the
> >> > message priority) at runtime ?
> >> >
> >> > On 5/14/07, Dominique DE VITO <do...@thalesgroup.com>
> >> wrote:
> >> >>
> >> >> I have some questions about defining/changing a JMS consumer's
> >> priority
> >> >> inside ServiceMix.
> >> >>
> >> >> * Priority defined at startup time
> >> >>
> >> >> Possible through http://activemq.apache.org/consumer-priority.html ?
> >> >> Is it correct ?
> >> >>
> >> >> * Priority defined dynamically
> >> >>
> >> >> It is not possible to change JMS consumer's priority at runtime
> >> inside
> >> >> SMX.
> >> >> Is it correct ?
> >> >>
> >> >> What about the following solution: exposing a "priority" field
> inside
> >> >> JmsConfigurationMBean class and using this priority when creating a
> >> >> MessageConsumer ?
> >> >>
> >> >> Thanks.
> >> >>
> >> >> Dominique
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>
--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/
Re: changing jms consumer priorities at runtime
Posted by Dominique DE VITO <do...@thalesgroup.com>.
I understand your response like this:
- it's a priority defining concurrency between possible consumers of the
*same* messages,
- it's NOT a priority defining (CPU) concurrency between all the
consumers (then, my use case could not be implemented)
Is it correct ?
Guillaume Nodet wrote :
> If i understand correctly, the consumer priority is only used when
> choosing
> a consumer
> to dispatch the message to. It won't affect the priority between
> messages,
> which
> is from what you want if I understand correctly.
>
> On 5/14/07, Dominique DE VITO <do...@thalesgroup.com> wrote:
>>
>> Yes, the priority can't be changed at runtime in ActieMQ
>>
>> But I think it could be done in SMX.
>>
>> A "queue" looks like created for *each* StandardConsumerProcessor.poll()
>> method call:
>> destination = session.createQueue(endpoint.getJmsProviderDestinationName
>> ());
>>
>> While changing "JmsProviderDestinationName" property value, from
>> "TEST.QUEUE?consumer.prority=10" string value to
>> "TEST.QUEUE?consumer.prority=20" string value, the consumer's priority
>> might be changed, I think, inside SMX.
>>
>> Does it make sense ?
>>
>> Here is the use case:
>> - my own business flows are from/to JMS endpoints, with various
>> intermediate steps,
>> - I want to modify flow priorities at business level
>> - the simplest way I have found is to modify JMS consumer priority to
>> change the associated business flow priority.
>>
>> Dominique
>>
>>
>> Guillaume Nodet a écrit :
>> > I don't think the priority can be changed at runtime in ActieMQ.
>> > This will need to close and recreate a new consumer, i.e. stop /
>> restart
>> > the endpoint / SU / SA ...
>> > Another problem is that this is an ActiveMQ specific property ...
>> >
>> > What's your use case for changing the consumer prioirity (and not the
>> > message priority) at runtime ?
>> >
>> > On 5/14/07, Dominique DE VITO <do...@thalesgroup.com>
>> wrote:
>> >>
>> >> I have some questions about defining/changing a JMS consumer's
>> priority
>> >> inside ServiceMix.
>> >>
>> >> * Priority defined at startup time
>> >>
>> >> Possible through http://activemq.apache.org/consumer-priority.html ?
>> >> Is it correct ?
>> >>
>> >> * Priority defined dynamically
>> >>
>> >> It is not possible to change JMS consumer's priority at runtime
>> inside
>> >> SMX.
>> >> Is it correct ?
>> >>
>> >> What about the following solution: exposing a "priority" field inside
>> >> JmsConfigurationMBean class and using this priority when creating a
>> >> MessageConsumer ?
>> >>
>> >> Thanks.
>> >>
>> >> Dominique
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Re: changing jms consumer priorities at runtime
Posted by Guillaume Nodet <gn...@gmail.com>.
If i understand correctly, the consumer priority is only used when choosing
a consumer
to dispatch the message to. It won't affect the priority between messages,
which
is from what you want if I understand correctly.
On 5/14/07, Dominique DE VITO <do...@thalesgroup.com> wrote:
>
> Yes, the priority can't be changed at runtime in ActieMQ
>
> But I think it could be done in SMX.
>
> A "queue" looks like created for *each* StandardConsumerProcessor.poll()
> method call:
> destination = session.createQueue(endpoint.getJmsProviderDestinationName
> ());
>
> While changing "JmsProviderDestinationName" property value, from
> "TEST.QUEUE?consumer.prority=10" string value to
> "TEST.QUEUE?consumer.prority=20" string value, the consumer's priority
> might be changed, I think, inside SMX.
>
> Does it make sense ?
>
> Here is the use case:
> - my own business flows are from/to JMS endpoints, with various
> intermediate steps,
> - I want to modify flow priorities at business level
> - the simplest way I have found is to modify JMS consumer priority to
> change the associated business flow priority.
>
> Dominique
>
>
> Guillaume Nodet a écrit :
> > I don't think the priority can be changed at runtime in ActieMQ.
> > This will need to close and recreate a new consumer, i.e. stop / restart
> > the endpoint / SU / SA ...
> > Another problem is that this is an ActiveMQ specific property ...
> >
> > What's your use case for changing the consumer prioirity (and not the
> > message priority) at runtime ?
> >
> > On 5/14/07, Dominique DE VITO <do...@thalesgroup.com> wrote:
> >>
> >> I have some questions about defining/changing a JMS consumer's priority
> >> inside ServiceMix.
> >>
> >> * Priority defined at startup time
> >>
> >> Possible through http://activemq.apache.org/consumer-priority.html ?
> >> Is it correct ?
> >>
> >> * Priority defined dynamically
> >>
> >> It is not possible to change JMS consumer's priority at runtime inside
> >> SMX.
> >> Is it correct ?
> >>
> >> What about the following solution: exposing a "priority" field inside
> >> JmsConfigurationMBean class and using this priority when creating a
> >> MessageConsumer ?
> >>
> >> Thanks.
> >>
> >> Dominique
> >>
> >>
> >
> >
>
>
--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/
Re: changing jms consumer priorities at runtime
Posted by Dominique DE VITO <do...@thalesgroup.com>.
Yes, the priority can't be changed at runtime in ActieMQ
But I think it could be done in SMX.
A "queue" looks like created for *each* StandardConsumerProcessor.poll()
method call:
destination = session.createQueue(endpoint.getJmsProviderDestinationName());
While changing "JmsProviderDestinationName" property value, from
"TEST.QUEUE?consumer.prority=10" string value to
"TEST.QUEUE?consumer.prority=20" string value, the consumer's priority
might be changed, I think, inside SMX.
Does it make sense ?
Here is the use case:
- my own business flows are from/to JMS endpoints, with various
intermediate steps,
- I want to modify flow priorities at business level
- the simplest way I have found is to modify JMS consumer priority to
change the associated business flow priority.
Dominique
Guillaume Nodet a écrit :
> I don't think the priority can be changed at runtime in ActieMQ.
> This will need to close and recreate a new consumer, i.e. stop / restart
> the endpoint / SU / SA ...
> Another problem is that this is an ActiveMQ specific property ...
>
> What's your use case for changing the consumer prioirity (and not the
> message priority) at runtime ?
>
> On 5/14/07, Dominique DE VITO <do...@thalesgroup.com> wrote:
>>
>> I have some questions about defining/changing a JMS consumer's priority
>> inside ServiceMix.
>>
>> * Priority defined at startup time
>>
>> Possible through http://activemq.apache.org/consumer-priority.html ?
>> Is it correct ?
>>
>> * Priority defined dynamically
>>
>> It is not possible to change JMS consumer's priority at runtime inside
>> SMX.
>> Is it correct ?
>>
>> What about the following solution: exposing a "priority" field inside
>> JmsConfigurationMBean class and using this priority when creating a
>> MessageConsumer ?
>>
>> Thanks.
>>
>> Dominique
>>
>>
>
>
Re: changing jms consumer priorities at runtime
Posted by Guillaume Nodet <gn...@gmail.com>.
I don't think the priority can be changed at runtime in ActiveMQ.
This will need to close and recreate a new consumer, i.e. stop / restart
the endpoint / SU / SA ...
Another problem is that this is an ActiveMQ specific property ...
What's your use case for changing the consumer prioirity (and not the
message priority) at runtime ?
On 5/14/07, Dominique DE VITO <do...@thalesgroup.com> wrote:
>
> I have some questions about defining/changing a JMS consumer's priority
> inside ServiceMix.
>
> * Priority defined at startup time
>
> Possible through http://activemq.apache.org/consumer-priority.html ?
> Is it correct ?
>
> * Priority defined dynamically
>
> It is not possible to change JMS consumer's priority at runtime inside
> SMX.
> Is it correct ?
>
> What about the following solution: exposing a "priority" field inside
> JmsConfigurationMBean class and using this priority when creating a
> MessageConsumer ?
>
> Thanks.
>
> Dominique
>
>
--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/