Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5825

ConsumeJMS - Not using Clientid / durable does not works

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.0
    • None
    • Core Framework
    • None

    Description

      I cannot make the ConsumeJMS 1.8.0 processor work as a "durable consumer". I set the client id, but it mis-used. I'm using ActiveMQ (AmazonMQ).

       

      I set (check pictures for full details) : 

      • "sub" in Connection Client Id
      • "true" in durable subscription

      Result in ActiveMQ :

      • NIFI creates in "Durable Topic Subscribers" "sub-<increment>" (like "sub-4" instead of "sub").

       

       

      I think the problem may be in AbstractJMSProcessor.java/buildTargetResource and we should have something like that : 

      String clientId = context.getProperty(CLIENT_ID).evaluateAttributeExpressions().getValue();
      
      if (clientId != null) {
      if (!durable){ 
      // we have to generate a unique, dynamique, temp, client id
      clientId = clientId + "-" + clientIdCounter.getAndIncrement();
      }
      cachingFactory.setClientId(clientId);
      }
      

       
      But dunno how to get this "durable" prop in the Abstract during the "OnTrigger" stuff...

       

       

      Attachments

        1. amq_consume.JPG
          23 kB
          Mermillod
        2. nifi_consumejms.JPG
          49 kB
          Mermillod

        Activity

          People

            Unassigned Unassigned
            Firenz Mermillod
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: