[
https://issues.apache.org/jira/browse/QPID-7815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125716#comment-16125716
]
Lorenz Quack commented on QPID-7815:
------------------------------------
The stuff around {{AbstractQueue#createPostEnqueueOverflowPolicyHandler}} seems
weird.
There are two calls to it, in {{onOpen}} and {{changeAttributes}}. After both
calls we create a {{RejectPolicyHandler}} if necessary but {{onOpen}} we also
call {{RejectPolicyHandler#onQueueOpen}}. However, {{onQueueOpen}} seems to
duplicate the work done in the constructor (which in turn duplicates the work
done in {{RejectPolicyHandler#addMessageDeleteListener}}).
I suggest
* call {{RejectPolicyHandler#addMessageDeleteListener}} from the constructor
instead of duplicating the code.
* remove {{RejectPolicyHandler#onQueueOpen}} and the call to it from
{{AbstractQueue#onOpen}}.
* move creation of {{RejectPolicyHandler}} to
{{AbstractQueue#createPostEnqueueOverflowPolicyHandler}}
> Reject policy type
> ------------------
>
> Key: QPID-7815
> URL: https://issues.apache.org/jira/browse/QPID-7815
> Project: Qpid
> Issue Type: New Feature
> Components: Java Broker
> Affects Versions: qpid-java-broker-7.0.0
> Reporter: Tomas Vavricka
> Labels: policy-type, queue, reject
> Fix For: qpid-java-broker-7.0.0
>
> Attachments: 0001-QPID-7815-Add-support-for-reject-policy.patch,
> 0001-QPID-7815-Fix-recovery-of-queue-with-reject-policy.patch,
> 0001-QPID-7815-Java-Broker-Enable-QueuePolicyTests-on-all.patch,
> 0001-QPID-7815-Reject-policy-type.patch, 1 before restart.png, 2 after
> restart.png, broker.log, default.json
>
>
> It would be good if Java Broker will support reject policy.
> Reject policy - reject incoming message(s) when queue capacity is reached
> Queue capacity can be defined by maximum count of message and maximum size of
> messages (including header).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]