[
https://issues.apache.org/jira/browse/QPID-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632689#action_12632689
]
Rob Godfrey commented on QPID-1287:
-----------------------------------
Review
======
Not really very fond of the solution which ends up with
<priority>-70</priority> also leading to the setting up of a ten level priority
queue
The original code was admittedly weak on validation, but something like
boolean priority = queueConfiguration.getBoolean("priority",
false);
Integer priorities =
queueConfiguration.getInteger("priorities", null);
if(priorities instanceof Integer)
{
if(priorities.intValue() > 0)
{
if(arguments == null)
{
arguments = new FieldTable();
}
arguments.put(new AMQShortString("x-qpid-priorities"),
priorities);
}
else
{
// DEAL WITH ERROR HERE
}
}
else if(priority ||
queueConfiguration.containsKey("priorities"))
{
if(arguments == null)
{
arguments = new FieldTable();
}
arguments.put(new AMQShortString("x-qpid-priorities"),
10);
}
There's a strong argument that 10 should be turned into a constant too...
Should also deal with the ConversionException you'd get for
<priorities>Apple</priorities>
> Priority queue configuration should be easier for JMS semantics
> ---------------------------------------------------------------
>
> Key: QPID-1287
> URL: https://issues.apache.org/jira/browse/QPID-1287
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Affects Versions: M4
> Reporter: Aidan Skinner
> Assignee: Aidan Skinner
> Fix For: M4
>
>
> The Priority Queue configuration should allow a simple <priority> definition
> which gets you 10 levels, which is what JMS semantics define.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.