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

          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
          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)
          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?
          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?

            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