[
https://jira.jboss.org/jira/browse/JBMESSAGING-1090?page=com.atlassian.ji...
]
Jeff Wilker commented on JBMESSAGING-1090:
------------------------------------------
When the "drop-messages-when-full" option is enabled, will it be possible to
detect when messages are dropped? If not, then would it be possible to please reopen this
Jira?
The motivation behind the request is as follows. For non-durable subscribers, we would
typically prefer to drop messages, rather than page, for performance reasons. Therefore,
I expect the "drop-messages-when-full" setting would be useful here. However,
we need to detect this situation and take the appropriate corrective action (e.g. raise a
system alarm).
Also, more generally, for any subscriber (durable or non-durable) we ultimately need to
limit the use of physical resources, whether that be a database or file system.
Therefore, at some point, messages will be dropped, with a similar requirement to detect
that this has occurred.
Add appropriate Exception handling when hitting MaxSize
-------------------------------------------------------
Key: JBMESSAGING-1090
URL:
https://jira.jboss.org/jira/browse/JBMESSAGING-1090
Project: JBoss Messaging
Issue Type: Feature Request
Components: Messaging Core
Affects Versions: 1.4.0.GA
Reporter: Jay Howell
Assignee: Tim Fox
Priority: Minor
Fix For: 2.0.0 Beta
When using MaxSize for a queue and topic the following behaviors exist
Queue - When a queue hits MaxSize, the delivery returned in Channel Support is null.
This triggers a very generic JMSException to be thrown by looking at the delivery and
seeing if it's null in the ServerConnectionEndpoint.
Topic - When a subscription hits the MaxSize(defined in the topic), the delivery returned
will be null, but no check is done and no JMSException is thrown in the
ServerConnectionEndpoint.
What this means is that anyone who wants to put hooks in to gather the messages dropped
can't. Either because the exception is too generic or because one is not thrown at
all.
I would purpose that we put proper exception handling down in the ChannelSupport where
MaxSize is checked for both queues and subscriptions.
We would need to Change the The two methods in channel support for send and sendInternal
to throw a JMSException. Then we throw a checked Exception in ChannelSupport for MaxSize
violations(make a new exception derived from MessagingJMSException).
Adding proper exception handling to these would allow users to add aspects and
notifications when messages are dropped due to MaxSize.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira