[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1090) Add appropriate Exception handling when hitting MaxSize

Jay Howell (JIRA) jira-events at lists.jboss.org
Wed Jan 16 10:26:19 EST 2008


    [ http://jira.jboss.com/jira/browse/JBMESSAGING-1090?page=comments#action_12395336 ] 
            
Jay Howell commented on JBMESSAGING-1090:
-----------------------------------------

Right, this was just a proposal, that I later looked at and didn't like.  The goal here is to have some way of notifying or putting in some logic to do something when messages are dropped.  So I agree that the exception idea may not be a good one, But I'm still not sure I would call dropping the messages and just putting an entry in the log "proper handing".  Not sure what the solution is, but we need a way to inject a handler so that we can call whatever logic we need to when messages do get dropped.  

One more solution would be to handle it like the DLQ or the Expiry Queue.  We could have an option to put messages in an Overflow Queue.   Right now we move things to other queues based on the amount of time the message is a live(expiry queue), and we move it to a queue based on the amount of times that someones tried to process it(DLQ), so we could add one more thing to drop messages that exceed MaxSize to a queue.  If users want them deleted, they can set the TTL for things going into that queue to 1, or if they wan to process them or do notifications, they can have a consumer do something with them.  That seems to give the most flexibility is to model it after the DLQ.  


> Add appropriate Exception handling when hitting MaxSize
> -------------------------------------------------------
>
>                 Key: JBMESSAGING-1090
>                 URL: http://jira.jboss.com/jira/browse/JBMESSAGING-1090
>             Project: JBoss Messaging
>          Issue Type: Feature Request
>          Components: Messaging Core
>    Affects Versions: 1.4.0.GA
>            Reporter: Jay Howell
>         Assigned To: Jay Howell
>            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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list