Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RabbitMQ: Support for consistent hash exchanges #624

Closed
theabuitendyk opened this issue Jul 19, 2023 · 0 comments · Fixed by #682
Closed

RabbitMQ: Support for consistent hash exchanges #624

theabuitendyk opened this issue Jul 19, 2023 · 0 comments · Fixed by #682
Labels
enhancement New feature or request good first issue Good for newcomers rabbitmq

Comments

@theabuitendyk
Copy link

I have a unique use case where I'd like to have:

Would there be support behind adding an alternate handler config that allows binding to multiple queues and exchanges so that I can avoid duplicate handlers? This would also reduce the risk of forgetting to add a new handler for each additional queue added to a consistent hash exchange.

Something like this:

{
  exchanges: [
    {
      name: 'consistent-hash-exchange',
      type: 'x-consistent-hash',
    },
    {
      name: 'consistent-hash-exchange.retry',
      type: 'x-delayed-message',
      options: { 'x-delayed-type': 'x-consistent-hash' }
    }
  ],
  handlers: {
    handler1: [
      {
        exchange: 'consistent-hash-exchange',
        queue: [
          { queue: 'queue-one', routingKey: '1' },
          { queue: 'queue-two', routingKey: '2' },
          ...
        ],
      },
      {
        exchange: 'consistent-hash-exchange.retry',
        queue: [
          { queue: 'queue-one', routingKey: '1' },
          { queue: 'queue-two', routingKey: '2' },
          ...
        ],
      },
  },
  uri: '',
}
@theabuitendyk theabuitendyk changed the title Support for consistent hash exchanges RabbitMQ: Support for consistent hash exchanges Jul 19, 2023
@underfisk underfisk added enhancement New feature or request good first issue Good for newcomers rabbitmq labels Aug 4, 2023
ttshivers added a commit to ttshivers/nestjs that referenced this issue Jan 21, 2024
Support multiple configurations on the same handler to support use cases where users want to reuse
the same handler method across multiple queues. For example, this could be useful for a situation
where messages are partitioned across multiple queues by a consistent hash exchange.

fix golevelup#624
ttshivers added a commit to ttshivers/nestjs that referenced this issue Jan 21, 2024
Support multiple configurations on the same handler to support use cases where users want to reuse
the same handler method across multiple queues. For example, this could be useful for a situation
where messages are partitioned across multiple queues by a consistent hash exchange.

fix golevelup#624
underfisk pushed a commit that referenced this issue Jan 21, 2024
Support multiple configurations on the same handler to support use cases where users want to reuse
the same handler method across multiple queues. For example, this could be useful for a situation
where messages are partitioned across multiple queues by a consistent hash exchange.

fix #624
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers rabbitmq
Projects
None yet
2 participants