Skip to content

Duplicate subqueue registration makes messages unreachable #8223

Closed as not planned
Closed as not planned

Description

@carloea2

Feature Summary

The queue replaces the key lookup when the same subqueue is registered twice, but its priority group still contains the original queue. New messages then increase the total count while becoming unreachable to consumers.

Before: duplicate key -> lookup points to an orphan queue -> total count includes an unreachable message

After: duplicate key -> existing queue is preserved -> all messages remain selectable

Expected behavior:

Registering an existing key should preserve and return the registered queue so previously and subsequently enqueued messages remain reachable.

Reproduction evidence:

On current main, register a subqueue, enqueue one message, register the same key again, and enqueue a second message. The first message can be read, but peek() then returns None while the reported total size remains 1.

Observed on 70c21145887920528d7d5540e3fb790b43e8b759:

first_registration=None
duplicate_returned_old=True
reported_total=2
reported_key=1
first_get=first
after_first_total=1
peek_after_first=None

Version and commit evidence:

1.3.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

70c21145887920528d7d5540e3fb790b43e8b759

Proposed Solution or Design

After: duplicate key -> existing queue is preserved -> all messages remain selectable

Expected behavior:

Affected Area

Workflow Engine (Amber)

Activity

  1. added theissue type on Aug 31, 2026
  2. changed the issue type fromtoon Aug 31, 2026
  3. carloea2 commented on Sep 5, 2026

    @carloea2
    ContributorAuthor

    /take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions