camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-3631) Graceful shutdown - Add logic to detect slow/hung in-flight exchanges
Date Mon, 28 Mar 2011 15:36:05 GMT

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

Claus Ibsen commented on CAMEL-3631:
------------------------------------

Ashwin I think we should keep the contract as is, but store the Exchange in the inflight registry
in the ConcurrentMap instead of just the exchangeId. So the key = exchangeId, value = exchange.
That allow us to use the concurrent map with an atomic operation using the putIfAbsent.

Then we can have access to the Exchange during shutdown. And thus we can gather more details
such as
- age of exchange
- message history of exchange
- current node / route

And thus be able to add logic which kinda traverse the inflight registry and
- if exchange > XX age &&
- exchange "stuck" at same X position since X time -> log
- then log a WARN.

We should not add new SPI interfaces etc. Also we should only add an option for end user to
configure on GracefulShudown the XXX threshold for exchange "stuck". So the end user can say,
eg 5 seconds. So if a message is at the same position > 5 secs then its regarded as stuck.
And also there should be an option to set the "age" threshold as well. So if the message >
20 sec. then the message is considering being old, and a candidate for being stuck.

> Graceful shutdown - Add logic to detect slow/hung in-flight exchanges
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-3631
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3631
>             Project: Camel
>          Issue Type: Improvement
>    Affects Versions: 2.6.0
>            Reporter: Claus Ibsen
>            Assignee: Ashwin Karpe
>             Fix For: 2.8.0
>
>         Attachments: Camel-3631.patch
>
>
> We should improved the graceful shutdown to be more verbose and provide more detailed
information when it appears in-flight exchange(s) appear to be hung.
> We have the created timestamp on the exchange, and if we let in flight repo, track each
exchange, then we can grab the exchange and thus know how long time it currently has been
in-flight. And then if the time is > threshold, we can output that in the logs.
> It requires the in flight registry now also keep track of each exchange. We may consider
this as an optional feature you should enable, as it requires us to put/remove Exchange into
a ConcurrentMap to keep track of each exchange.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message