Flume
  1. Flume
  2. FLUME-2311

Use standard way of finding queue/topic

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: v1.4.0
    • Fix Version/s: v1.5.0
    • Component/s: None
    • Labels:
    • Release Note:
      Use of JNDI lookup to find destination. The default mode still use "Create destination identifier" mode. Use destinationLocator=JNDI to enable this feature

      Description

      Here https://issues.apache.org/jira/browse/FLUME-924?focusedCommentId=13890651&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13890651

      Hugo Lassiège says:

      I'm currently using this jms source to connect on Weblogic message bus. I'm wondering why the JMSMessageConsumer use createQueue and createTopic instead of lookup to find the destinations (line 83 to 90).
      It seems that "createQueue" or "createTopic" are not the recommended way because it is not portable (I saw that warning in Weblogic documentation even if I can't justify this assertion).
      The documentation recommends to use a JNDI lookup (http://docs.oracle.com/cd/E23943_01/web.1111/e13727/lookup.htm#BABDFCIC).
      Is there any reason to use createQueue instead of lookup ?

      1. 0001-Patch-for-FLUME-2311.patch
        19 kB
        Hugo Lassiège
      2. 0001-Patch-for-FLUME-2311.patch
        19 kB
        Hugo Lassiège

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          1d 16h 57m 1 Hugo Lassiège 06/Feb/14 10:39
          Patch Available Patch Available Resolved Resolved
          1d 6h 32m 1 Brock Noland 07/Feb/14 17:12
          Hide
          Hudson added a comment -

          SUCCESS: Integrated in flume-trunk #546 (See https://builds.apache.org/job/flume-trunk/546/)
          FLUME-2311 - Use standard way of finding queue/topic (Hugo Lassi��ge via Brock Noland) (brock: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=e30cbd544e6ca0b8a19d2e9db491c679e9ca4ee8)

          • flume-ng-sources/flume-jms-source/src/test/java/org/apache/flume/source/jms/TestIntegrationActiveMQ.java
          • flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSMessageConsumerFactory.java
          • flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java
          • flume-ng-sources/flume-jms-source/src/test/java/org/apache/flume/source/jms/JMSMessageConsumerTestBase.java
          • flume-ng-sources/flume-jms-source/src/test/java/org/apache/flume/source/jms/TestJMSSource.java
          • flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSMessageConsumer.java
          • flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSDestinationLocator.java
          • flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSourceConfiguration.java
          Show
          Hudson added a comment - SUCCESS: Integrated in flume-trunk #546 (See https://builds.apache.org/job/flume-trunk/546/ ) FLUME-2311 - Use standard way of finding queue/topic (Hugo Lassi��ge via Brock Noland) (brock: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=e30cbd544e6ca0b8a19d2e9db491c679e9ca4ee8 ) flume-ng-sources/flume-jms-source/src/test/java/org/apache/flume/source/jms/TestIntegrationActiveMQ.java flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSMessageConsumerFactory.java flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSource.java flume-ng-sources/flume-jms-source/src/test/java/org/apache/flume/source/jms/JMSMessageConsumerTestBase.java flume-ng-sources/flume-jms-source/src/test/java/org/apache/flume/source/jms/TestJMSSource.java flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSMessageConsumer.java flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSDestinationLocator.java flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/JMSSourceConfiguration.java
          Brock Noland made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Brock Noland made changes -
          Assignee Hugo Lassiège [ hlassiege ]
          Fix Version/s v1.5.0 [ 12324642 ]
          Hide
          Brock Noland added a comment -

          I committed this to trunk and 1.5! Thank you very much Hugo! This was a great contribution.

          Show
          Brock Noland added a comment - I committed this to trunk and 1.5! Thank you very much Hugo! This was a great contribution.
          Hide
          ASF subversion and git services added a comment -

          Commit db1abb0a82c46bd7c8dd44629f4a1c98e01abf9e in branch refs/heads/flume-1.5 from Brock Noland
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=db1abb0 ]

          FLUME-2311 - Use standard way of finding queue/topic (Hugo Lassiège via Brock Noland)

          Show
          ASF subversion and git services added a comment - Commit db1abb0a82c46bd7c8dd44629f4a1c98e01abf9e in branch refs/heads/flume-1.5 from Brock Noland [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=db1abb0 ] FLUME-2311 - Use standard way of finding queue/topic (Hugo Lassiège via Brock Noland)
          Hide
          ASF subversion and git services added a comment -

          Commit e30cbd544e6ca0b8a19d2e9db491c679e9ca4ee8 in branch refs/heads/trunk from Brock Noland
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=e30cbd5 ]

          FLUME-2311 - Use standard way of finding queue/topic (Hugo Lassiège via Brock Noland)

          Show
          ASF subversion and git services added a comment - Commit e30cbd544e6ca0b8a19d2e9db491c679e9ca4ee8 in branch refs/heads/trunk from Brock Noland [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=e30cbd5 ] FLUME-2311 - Use standard way of finding queue/topic (Hugo Lassiège via Brock Noland)
          Hugo Lassiège made changes -
          Link This issue is related to FLUME-2313 [ FLUME-2313 ]
          Hugo Lassiège made changes -
          Link This issue is a clone of FLUME-2313 [ FLUME-2313 ]
          Hugo Lassiège made changes -
          Attachment 0001-Patch-for-FLUME-2311.patch [ 12627582 ]
          Hide
          Hugo Lassiège added a comment -

          Here is the new patch without extra spaces

          Show
          Hugo Lassiège added a comment - Here is the new patch without extra spaces
          Hide
          Brock Noland added a comment -

          Nice! This patch generally looks great! The only issue I see is that the patch uses tabs (or 4 spaces) as opposed to 2 spaces. Would you mind re formatting the patch?

          Show
          Brock Noland added a comment - Nice! This patch generally looks great! The only issue I see is that the patch uses tabs (or 4 spaces) as opposed to 2 spaces. Would you mind re formatting the patch?
          Hugo Lassiège made changes -
          Link This issue is a clone of FLUME-2313 [ FLUME-2313 ]
          Hugo Lassiège made changes -
          Attachment 0001-Patch-for-FLUME-2311.patch [ 12627324 ]
          Hugo Lassiège made changes -
          Field Original Value New Value
          Status Open [ 1 ] Patch Available [ 10002 ]
          Release Note Use of JNDI lookup to find destination. The default mode still use "Create destination identifier" mode. Use destinationLocator=JNDI to enable this feature
          Affects Version/s v1.4.0 [ 12323372 ]
          Labels flume jms patch
          Hide
          Hugo Lassiège added a comment -

          Hi,

          Here is the patch. I've added a test in TestIntegrationActiveMQ and all other tests still works.
          As it is a breaking change, I've added a configuration key to enable this feature.
          Use destinationLocator=JNDI to enable this feature in flume.conf.

          Show
          Hugo Lassiège added a comment - Hi, Here is the patch. I've added a test in TestIntegrationActiveMQ and all other tests still works. As it is a breaking change, I've added a configuration key to enable this feature. Use destinationLocator=JNDI to enable this feature in flume.conf.
          Hide
          Brock Noland added a comment -

          Thank you!!

          Show
          Brock Noland added a comment - Thank you!!
          Hide
          Hugo Lassiège added a comment -

          Hi,

          Yes, I've made the change and it works with a jndi lookup now. I'll make a code review with a colleague tomorrow and I'll attach a patch after that.

          Show
          Hugo Lassiège added a comment - Hi, Yes, I've made the change and it works with a jndi lookup now. I'll make a code review with a colleague tomorrow and I'll attach a patch after that.
          Hide
          Brock Noland added a comment -

          Hugo Lassiège, would you be in a position to make the change and see if it fixes your issues?

          Show
          Brock Noland added a comment - Hugo Lassiège , would you be in a position to make the change and see if it fixes your issues?
          Brock Noland created issue -

            People

            • Assignee:
              Hugo Lassiège
              Reporter:
              Brock Noland
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development