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

Add QueueType model #946

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

geirolz
Copy link

@geirolz geirolz commented May 2, 2024

This PR simply adds a model to type the possible queue types.
It also add some useful argument keys.

I was tempted to add the queue type as parameter of DeclarationQueueConfig with default as Classic.
The problem is that semantically, since it is part of the configuration, we should override the the args and this creates breaking changes.
We could consider to let the user override this config like this

    override def declareQueue(channel: AMQPChannel, config: DeclarationQueueConfig): F[Unit] =
      Sync[F].blocking {
        channel.value.queueDeclare(
          config.queueName.value,
          config.durable.isTrue,
          config.exclusive.isTrue,
          config.autoDelete.isTrue,
          Map(`x-queue-type` -> config.queueType.asString) ++ config.arguments
        )
      }.void

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant