falcon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkatesh Seetharam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FALCON-665) Handle message consumption failures in JMSMessageConsumer
Date Tue, 09 Sep 2014 17:38:29 GMT

    [ https://issues.apache.org/jira/browse/FALCON-665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14127279#comment-14127279
] 

Venkatesh Seetharam commented on FALCON-665:
--------------------------------------------

bq. Can we log the exception in closeConnectionQuietly? 
Why, it does not matter IMO, this is when falcon is shutdown and we are not able to close
these objects. 

bq. Thanks for taking this up
I wasnt thinking right. :-)

bq. CLIENT_ACKNOWLEDGE => client acknowledges a message by calling the message's acknowledge
method. Acknowledging a consumed message automatically acknowledges the receipt of all messages
that have been delivered by its session.
bq. Client acknowledge won't work for us. We need:
Hmmm, did not read that. Good catch.

bq. ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE => Special version of the CLIENT_​ACKNOWLEDGE
mode which allows to cherry-pick messages to ACK.
This is NOT available in javax.jms.Session

bq. Message.ack() only acks an individual message, as opposed to acting as a cumulative ack.
This is exactly the semantics that we need here, no? Are you not contradicting your previous
statement *Acknowledging a consumed message automatically acknowledges the receipt of all
messages that have been delivered by its session.*

bq. Can we send to GenericAlert, so that when we are good with monitoring framework we can
easily find such issues.
I'm not sure what you are looking at, but this already exists.
{code}
    @Override
    public void onMessage(Message message) {
        MapMessage mapMessage = (MapMessage) message;
        LOG.info("Received message {}", message.toString());

        try {
            WorkflowExecutionContext context = createContext(mapMessage);
            if (context.hasWorkflowFailed()) {
                onFailure(context);
            } else if (context.hasWorkflowSucceeded()) {
                onSuccess(context);
            }

            message.acknowledge();

        } catch (JMSException e) {
            String errorMessage = "Error in onMessage for topicSubscriber of topic: "
                    + topicName + ", Message: " + message.toString();
            LOG.info(errorMessage, e);
            GenericAlert.alertJMSMessageConsumerFailed(errorMessage, e);
        }
    }
{code}

bq. Since we are ignoring all exceptions from listener, how does jms acknowledge help here?
Shouldn't the listeners just throw the exceptions so that activemq can re-send the failed
messages
I read the specs but it does not work that way. If the message is not ack'ed, it will be kept
around and when the subscriber comes back, it will resend all the messages. I may stand corrected.

bq. Also, we should be good with "AUTO_ACKNOWLEDGE" for performance constraints. INDIVIDUAL_ACKNOWLEDGE
is introduced later version of ActiveMQ I guess.
Not sure why we are revisiting this. AUTO_ACK wont work for us in this case. Client ACK is
the right semantics for what we want to achieve but how are messages replayed is a little
blur to me

[~shwethags], [~shaik.idris], can one of you pick this up please?

> Handle message consumption failures in JMSMessageConsumer
> ---------------------------------------------------------
>
>                 Key: FALCON-665
>                 URL: https://issues.apache.org/jira/browse/FALCON-665
>             Project: Falcon
>          Issue Type: Improvement
>          Components: messaging
>    Affects Versions: 0.6
>            Reporter: Venkatesh Seetharam
>            Assignee: Venkatesh Seetharam
>            Priority: Critical
>             Fix For: 0.6
>
>         Attachments: FALCON-665-review.patch
>
>
> Not sure which Queue ([~shwethags], [~shaik.idris])?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message