[openamq-dev] amq_server message limit
Pieter Hintjens
ph at imatix.com
Thu Apr 10 12:06:03 CEST 2008
On Thu, Apr 10, 2008 at 9:58 AM, Pieter Hintjens <ph at imatix.com> wrote:
> You have put your finger on it. We have three different scenarios in
> which limits are not applied:
>
> - null channel/connection, which happens in specific cases that I
> forget now but will look into again
This happens whenever messages are published by an internal source.
I.e. when an MTA publishes onto a queue in the same broker.
Dmitri, I'm going to simplify the queue limits model, which was
unnecessarily complex IMO. If limits are defined they should apply to
all queues, regardless of who publishes to them. (The original idea
was that superusers could publish to queues even if they were "full"
but that seems esoteric and confusing.)
So here is a patch which does what you need. This will be in the next release.
Regards,
Pieter
---- snip ----
--- amq_queue_basic.icl (revision 10991)
+++ amq_queue_basic.icl (working copy)
@@ -89,15 +89,10 @@
amq_content_basic_t
*oldest;
- connection = channel?
- amq_server_connection_link (channel->connection): NULL;
- if (connection) {
- if (connection->group == AMQ_CONNECTION_GROUP_NORMAL)
- for (limit_nbr = 0; limit_nbr < self->queue->limits;
limit_nbr++)
- if (queue_size >= self->queue->limit_value [limit_nbr])
- limit_action = self->queue->limit_action [limit_nbr];
- amq_server_connection_unlink (&connection);
- }
+ for (limit_nbr = 0; limit_nbr < self->queue->limits; limit_nbr++)
+ if (queue_size >= self->queue->limit_value [limit_nbr])
+ limit_action = self->queue->limit_action [limit_nbr];
+
---- snip ----
More information about the openamq-dev
mailing list