Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-1601

Naming consistency for named channels

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: To Do
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.x
    • Component/s: None
    • Labels:
      None

      Description

      There seems to be some inconsistency with the naming strategy for the named channels.

      For example:

      If we create a job "j1", the job launching request queue name in the message broker would "job:j1". To send a launching request, we can either use "queue:job:j1" or "job:j1" (both seems to work).

      If we create a stream with the named p2p channel "foo" we expect to use the syntax "queue:foo" and the message broker will have the queue name "queue:foo"

      The StreamConfigParser resolves the source/sink channel names for tap to deduce the module index from the channel component: ChannelNode.resolve(StreamLookupEnvironment env)

      But, in case of the named channels that have prefix "topic:" or "queue:", their names are used as is the only exception in a case where (From StreamConfigParser's eatChannelReference(boolean tapAllowed)

      // queue:XXX
      // topic:XXX
      if (firstToken.data.equalsIgnoreCase("queue")) {
          channelType = ChannelType.QUEUE;
      }
      else if (firstToken.data.equalsIgnoreCase("topic")) {
          channelType = ChannelType.TOPIC;
      }
      // TODO: DT not sure if this is the best way to handle
      // StreamConfigParserTests.substreamsWithSourceChannels()
      if (channelScopeComponents.size() >= 3) {
          channelScopeComponents.remove(0);
      }
      

      The above code makes sure, "queue:job:jobname" still points "job:jobname".

      We need some consistency when referring to the names of queues for the named channels above. Something like this:
      "queue:job:j1" for job launching request queue
      and "queue:foo" for the named p2p channel queue

      or, a better strategy the has consistency across the named channels.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            iperumal Ilayaperumal Gopinathan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: