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

exception during first resolve of temporary jms destination causes infinitive wait

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.24.2
    • 2.24.3, 3.0.0, 2.25.0
    • camel-jms
    • None
    • Patch Available
    • Unknown

    Description

      An exception during the first attempt to resolve a temporary destination will cause an infinitive wait for next resolve attempts after the exception is cleared.
      A likely scenario for this behaviour to occur is when no connection to a jms server can be established during startup.

      This bug is caused by not setting the refreshWanted to false when no previous destination exists in the org.apache.camel.component.jms.reply.TemporaryQueueReplyManager$TemporaryReplyQueueDestinationResolver class.

      public Destination resolveDestinationName(Session session, String destinationName, boolean pubSubDomain) throws JMSException {
          // use a temporary queue to gather the reply message
          synchronized (refreshWanted) {
              if (queue == null || refreshWanted.compareAndSet(true, false)) {
                  queue = session.createTemporaryQueue();
                  setReplyTo(queue);
                  if (log.isDebugEnabled()) {
                      log.debug("Refreshed Temporary ReplyTo Queue. New queue: {}", queue.getQueueName());
                  }
                  refreshWanted.notifyAll();
              }
          }
          return queue;
      }
      

      When queue == null the refreshWanted.compareAndSet(true, false) is not executed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Bas Claessen Bas Claessen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 20m
                1h 20m