Uploaded image for project: 'Immutant'
  1. Immutant
  2. IMMUTANT-198

Replace queue listeners and append topic listeners by default

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.8.0
    • Labels:
      None

      Description

      Multiple listen calls should replace listeners for queues, and they should append listeners for topics.

      Once this default behavior is implemented, we need to determine how best to override it, if at all.

        Gliffy Diagrams

          Activity

          Hide
          jcrossley Jim Crossley added a comment -

          With the latest commit (see Source tab) behavior is as suggested by this issue with no way to override. Multiple invocations of listen for any destination (queue or topic) with the exact same arguments should be idempotent, i.e. "replace" the existing handler.

          This is all based on the name we create for the listener's jboss "service". Since the handler function is not a part of that name for queues, multiple calls with the same dest and selector will replace the handler.

          The handler function is a part of the listener's name for topics, however. So multiple calls with the same dest and selector but different handlers will not replace any existing handler: both will be active.

          Hopefully, this matches default user expectations for queues and topics, but it's probably best to call unlisten before re-invoking listen and not rely on it.

          Show
          jcrossley Jim Crossley added a comment - With the latest commit (see Source tab) behavior is as suggested by this issue with no way to override. Multiple invocations of listen for any destination (queue or topic) with the exact same arguments should be idempotent, i.e. "replace" the existing handler. This is all based on the name we create for the listener's jboss "service". Since the handler function is not a part of that name for queues, multiple calls with the same dest and selector will replace the handler. The handler function is a part of the listener's name for topics, however. So multiple calls with the same dest and selector but different handlers will not replace any existing handler: both will be active. Hopefully, this matches default user expectations for queues and topics, but it's probably best to call unlisten before re-invoking listen and not rely on it.

            People

            • Assignee:
              jcrossley Jim Crossley
              Reporter:
              jcrossley Jim Crossley
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development