Thank you, Gordon. It works.

Is it possible to set the route without any key? I do not need it but I had
to give it a key, otherwise the qpid-route utility exits with usage output:

---------------------------------
qpid-route route add localhost:9001 localhost:9002 ex

Usage:  qpid-route [OPTIONS] dynamic add <dest-broker> <src-broker>
<exchange> [tag] [exclude-list] [mechanism]
        qpid-route [OPTIONS] dynamic del <dest-broker> <src-broker>
<exchange>

        qpid-route [OPTIONS] route add   <dest-broker> <src-broker>
<exchange> <routing-key> [tag] [exclude-list] [mechanism]
        qpid-route [OPTIONS] route del   <dest-broker> <src-broker>
<exchange> <routing-key>
        qpid-route [OPTIONS] queue add   <dest-broker> <src-broker>
<exchange> <queue> [mechanism]
        qpid-route [OPTIONS] queue del   <dest-broker> <src-broker>
<exchange> <queue>
        qpid-route [OPTIONS] route list  [<dest-broker>]
        qpid-route [OPTIONS] route flush [<dest-broker>]
        qpid-route [OPTIONS] route map   [<broker>]

        qpid-route [OPTIONS] link add  <dest-broker> <src-broker>
[mechanism]
        qpid-route [OPTIONS] link del  <dest-broker> <src-broker>
        qpid-route [OPTIONS] link list [<dest-broker>]
---------------------------------

Cheers,
Andreas


On Tue, Nov 28, 2017 at 5:30 PM, Gordon Sim <[email protected]> wrote:

> On 28/11/17 16:19, andi welchlin wrote:
>
>> Hello,
>>
>> I tried to create a route between exchanges. When I sent a message to the
>> exchange on the first broker I did not get the message when I tried to
>> read
>> from the second broker.
>>
>> What I did is simple:
>>
>> - Startet two qpid daemons one on port 9001 and one on port 9002.
>> - qpid-config -b localhost:9001 add exchange topic ex
>> - qpid-config -b localhost:9002 add exchange topic ex
>> - qpid-route route add localhost:9001 localhost:9002 ex exroute
>>
>>
>> --------------------------------------------------------------------
>> Looked if route are there:
>>
>> qpid-route route map localhost:9001
>>
>> Finding Linked Brokers:
>>      localhost:9001... Ok
>>      localhost:9002...
>> Ok
>>
>> Dynamic Routes:
>>    none found
>>
>> Static Routes:
>>
>>    localhost:9001(ex=ex) <= localhost:9002(ex=ex) key=exroute
>>
>>
>> And on second broker:
>>
>> qpid-route route map localhost:9002
>>
>> Finding Linked Brokers:
>>      localhost:9002... Ok
>>      localhost:9001...
>> Ok
>>
>> Dynamic Routes:
>>    none found
>>
>> Static Routes:
>>
>>    localhost:9001(ex=ex) <= localhost:9002(ex=ex) key=exroute
>> --------------------------------------------------------------------
>>
>>
>> I started qpid-receive:
>>
>> qpid-receive -b localhost:9001 -a ex
>> --connection-option='{protocol:amqp1.0}' --timeout 999
>>
>> ... and sent a message using qpid-send:
>>
>> qpid-send -b localhost:9002 -a ex --connection-option='{protocol
>> :amqp1.0}'
>> --content-string "msg1"
>>
>>
>>
>> I would have expected to see the message with qid-receive but nothing
>> happened. Did I miss something?
>>
>
> Your route is for 'ex/exroute'. If you use that in the sender and receiver
> I think it should work. If you want the routes to be dynamically adjusted
> to match actual binding syou need the dynamic option to qpid-route. (If you
> just want simple pub-sub with no need for distinct routing keys, you can
> change your topic to type fanout).
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to