Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

akpuvvada
I have configured the 'runtimeConfigurationPlugin' and started the Active MQ.

Then added the below in policyEntries:
<policyEntry queue="test.configuration.dynamic.update"  prioritizedMessages="true" useCache="false" expireMessagesPeriod="0" />

After saving the config file, I am able to see that the console log got updated saying that config changes are detected and loaded.

When tested, however, Message Priority is not being enforced as expected on the queue.

Please advise where and what I am doing wrong?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

Tim Bain
Can you please confirm via JMX that the queue in question (with that exact
name) has PrioritizedMessages=true in its attributes? Let's make sure the
problem is that the setting isn't getting applied, rather than that it's
getting applied but not having the expected result.

Tim

On Jul 6, 2017 8:13 AM, "akpuvvada" <[hidden email]> wrote:

> I have configured the 'runtimeConfigurationPlugin' and started the Active
> MQ.
>
> Then added the below in policyEntries:
> <policyEntry queue="test.configuration.dynamic.update"
> prioritizedMessages="true" useCache="false" expireMessagesPeriod="0" />
>
> After saving the config file, I am able to see that the console log got
> updated saying that config changes are detected and loaded.
>
> When tested, however, Message Priority is not being enforced as expected on
> the queue.
>
> Please advise where and what I am doing wrong?
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-
> working-tp4728264.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

akpuvvada
Hi Tim,

You are correct that the property is not getting updated.
Even in JConsole, I am not able to update this particular property.
I guess this is not settable at Run-time.
Any idea?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

Tim Bain
Just to be sure: if you restart ActiveMQ with the policy in place, is it
applied as expected? I want to make sure that the only thing not working is
the application of the change at runtime.

On Jul 13, 2017 3:35 AM, "akpuvvada" <[hidden email]> wrote:

> Hi Tim,
>
> You are correct that the property is not getting updated.
> Even in JConsole, I am not able to update this particular property.
> I guess this is not settable at Run-time.
> Any idea?
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-
> working-tp4728264p4728516.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

akpuvvada
No, Tim.
I can see an update in the log that the configuration is updated, however the policy is not getting applied. When seen in JConsole, the detestation property is not showing as set.

Thanks
Anil
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

Tim Bain
To make sure I'm understanding your answer: when you *restart* the broker,
you see a log line saying that the broker applied your configuration, but
it doesn't have the desired effect. Is that what you're saying?

On Jul 14, 2017 5:07 AM, "akpuvvada" <[hidden email]> wrote:

> No, Tim.
> I can see an update in the log that the configuration is updated, however
> the policy is not getting applied. When seen in JConsole, the detestation
> property is not showing as set.
>
> Thanks
> Anil
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-
> working-tp4728264p4728549.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

akpuvvada
Sorry, Tim. I miss understood your previous question.
If I restart with the policy configured, the property is getting applied and it is working as expected. It is only not happening if I try to have it updated at runtime.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

Tim Bain
I finally got some time to dig into the code, and discovered that the
PolicyEntry.update() and PolicyEntry.baseUpdate() methods (
https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=blob;f=activemq-broker/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java;h=5b7ff0e184b9e6b4be6cf61ebcacc0a845bb1a6c;hb=HEAD)
don't attempt to set any of the three properties you're passing in.

I don't have any insight into why they wouldn't; maybe there's some reason
I'm not aware of why those specific attributes can't be updated (in which
case, we should document that on the wiki so users like you don't have to
find this out the hard way), but more likely they were just an oversight.
Can you please submit a bug in JIRA requesting that those attributes be set
when the policy entry is reloaded?

Thanks,
Tim

On Fri, Jul 14, 2017 at 6:48 PM, akpuvvada <[hidden email]> wrote:

> Sorry, Tim. I miss understood your previous question.
> If I restart with the policy configured, the property is getting applied
> and
> it is working as expected. It is only not happening if I try to have it
> updated at runtime.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/Active-MQ-runtimeConfigurationPlugin-Set-Message-Priority-Not-
> working-tp4728264p4728565.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

akpuvvada
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Active MQ - runtimeConfigurationPlugin - Set Message Priority - Not working

akpuvvada
This is what is updated in the JIRA (FYI) - this not going to be fixed, may be:

the priority support is not a good candidate for runtime modification because not only do the in-memory messages need to retained in priority memory, the store needs to retrieve and store messages in priority order. For this, the store needs a restart which is not practical.
Loading...