Skip to content

Url encoding of vhost #37

@romainjanvier

Description

@romainjanvier

I met an issue with the command to create queues. I have two vhosts in my application : / and /module. Then I made the configuration file with these two vhosts, here a sample :

/:
    exchanges:
        direct:
            type: direct
            durable: true
    queues:
        jobs_image:
            durable: true
            bindings:
                -
                    exchange: direct
                    routing_key: jobs_image

/module:
    exchanges:
        direct:
            type: direct
            durable: true
    queues:
        jobs_image:
            durable: true
            bindings:
                -
                    exchange: direct
                    routing_key: jobs_image

I realized the command is not able to manage 2 vhosts in the same file (unfortunately...), anyway, I split this configuration into two files.

But the execution of the queues creation command with the vhost /module didn't work because of the leading slash. I was able to make work the command naming vhost %2fmodule. But there is no need to url rewrite the default vhost thanks to this code : https://github.com/odolbeau/rabbit-mq-admin-toolkit/blob/master/src/Bab/RabbitMq/VhostManager.php#L21

Although leading slash is not required in the rabbitmq vhost name, many usage include it. So I ask why there is no url rewriting on every vhost name or is it intentional as the code seems to mean ?

Thanks for your great shared work.

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