Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5769

Camel JMS producer can block a thread under specific circumstances

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.8.6, 2.9.4, 2.10.2
    • 2.9.5, 2.10.3, 2.11.0
    • camel-jms
    • None
    • Unknown

    Description

      This is an edge case, but when the following circumstances concur, the asynchronous routing engine in Camel become blocked:

      • Sending an InOut exchange over JMS (request/reply), where:
      • Persistent messages are enabled (deliveryPersistent=true)
      • useMessageIDasCorrelationID is enabled
      • replyToType is Temporary queues (default) (using TemporaryQueueReplyManager)
      • a timeout is set

      You have to be really unlucky, but if the following condition is satisfied, a thread will become blocked:

      time the broker takes to ACK the produced message > message timeout

      Hence, if we have a timeout of 3000ms, and the broker takes 4000ms to ACK the message (e.g. slow Disk I/O while the journal is rotating - it happened to us), at some point we'll see this.

      2012-10-30 10:46:57,680 | WARN  | CorrelationMap | 89 - org.apache.camel.camel-core - 2.8.0.fuse-06-11 | Exception occurred during purge task. This exception will be ignored.
      java.lang.NullPointerException
      

      The CorrelationMap is rendered useless, so if subsequent exchanges time out, the ReplyHandler may never get an onTimeout callback, thus leading to the waiting thread getting blocked forever if the async routing engine was in place.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            raulvk Raúl Kripalani
            raulvk Raúl Kripalani
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment