#3168 protonmsg: allow users to specify router-specific topic prefixes
Merged by tkopecek. Opened by ktdreyer.
ktdreyer/koji rabbitmq-topic-prefixes  into  master

Download 3168.patch

Prior to this change, Koji would always send messages with a hard-coded topic:// prefix.

This works fine for ActiveMQ 5 and Artemis, but RabbitMQ does not support that syntax. Instead, RabbitMQ brokers expect clients to use topic addresses with a /topic/ prefix.

The RFE for RabbitMQ to support topic:// prefixes is https://github.com/rabbitmq/rabbitmq-server/issues/2583

In the meantime, allow users to specify topic:// or /topic/ explicitly in their configuration.

(Note: ActiveMQ 5 advertises its expected topic:// prefix in the initial connection properties, so we could read that value dynamically, but RabbitMQ and Artemis do not send an expected topic prefix connection properties, so we just make the user choose explicitly here.)

I wonder if we can make it backward-compatible (so people don't need to change their configs on update).

rebased onto f0e22f30c71368a83ba12eed6bbad13e63e49a74

Yes, this is backwards-compatible. I meant to highlight that in the comments with If the user specified a prefix that begins with one or the other, use that. If they chose neither, prepend "topic://". And the unit tests exercise this, with the bare "koji" or "brew" strings.

To make it even clearer, I've updated the commit message and comments to point out that this is specifically for backwards-compatibility.

:thumbsup:

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

QE folks, if you want to bring up a simple ActiveMQ 5 broker for testing, I wrote an Ansible role to do that at https://github.com/ktdreyer/koji-playbooks/pull/10

@ktdreyer thanks for that! We already do have some rudimentary ActiveMQ testing setup, but we'll keep this in mind - if the need arises.

Metadata Update from @jobrauer:
- Pull-request tagged with: testing-done

Commit fd516dff fixes this pull-request

Pull-Request has been merged by tkopecek

Metadata