You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Chris Richardson <cr...@fourc.eu> on 2014/06/17 10:59:07 UTC

Dispatch router multi-hop topology

Hi,

I'm trying to get an example of a multi-hop topology working with
qpid-dispatch 0.2 built against qpid-proton 0.28. The scenario is probably
most simply described by plagiarising the config files from the
tests/config-3-linear directory, which sets up a series of 3 sequentially
connected routers. From the test topology.txt:
  +----------+          +----------+          +----------+
  |QDR.A     |          |QDR.B     |          |QDR.C     |
  |port:     |          |port:     |          |port:     |
  | 20001    |--------->| 20002    |--------->| 20003    |
  |          |          |          |          |          |
  |          |          |          |          |          |
  +----------+          +----------+          +----------+

 * The direction of the arrow shows the direction of the connection setup
   Connector --> Listener

To each of the config files in this example I've added a listener:

listener {
    addr: 0.0.0.0
    port: 5672
    sasl-mechanisms: ANONYMOUS
}

with the port incremented to 5673 and 5674 in config files B and C (so it
can be run on a single machine).

I'm using drain/spout to send messages with the following syntax:
drain --connection-options {protocol:amqp1.0} -b 0.0.0.0:5672 -f myAddress
spout --connection-options {protocol:amqp1.0} -b 0.0.0.0:5674 myAddress

By varying the port number I can of course control which router the
messages are being sent/received from.

When the drain process connects I can see the mobile address registered on
all three routers. Sending messages via any pair of adjacent routers works
yet I am not able to send an address from router A to router C or visa
versa - spout does not return, presumably since it has not had confirmation
of delivery.

Am I doing something wrong?

Thanks

Chris

-- 

*Chris Richardson*, System Architect
cr@fourc.eu


*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
<http://www.fourc.eu/>*

*Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
<http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
<http://bit.ly/fourctw>!*

Re: Dispatch router multi-hop topology

Posted by Chris Richardson <cr...@fourc.eu>.
Aha, x-amqp-to works a treat.

I'd tried adding the x-opt-qd.to option mentioned here
https://qpid.apache.org/releases/qpid-dispatch-0.2/book/amqp-mapping.html
but in retrospect that does look more like an internal router property.

Many thanks!


On 17 June 2014 13:29, Ted Ross <tr...@redhat.com> wrote:

> Hi Chris,
>
> You may have run afoul of
> https://issues.apache.org/jira/browse/DISPATCH-1 which was fixed after
> 0.2.
>
> Spout doesn't set the "to" field in the messages it sends, it puts the
> address in the target of the link.
>
> You can work around this by adding the following to the spout command
> line:  --property x-amqp-to=myAddress
>
> Alternatively, you can try running Dispatch from trunk (you will need
> Proton 0.7 for this).
>
> -Ted
>
> On 06/17/2014 04:59 AM, Chris Richardson wrote:
> > Hi,
> >
> > I'm trying to get an example of a multi-hop topology working with
> > qpid-dispatch 0.2 built against qpid-proton 0.28. The scenario is
> probably
> > most simply described by plagiarising the config files from the
> > tests/config-3-linear directory, which sets up a series of 3 sequentially
> > connected routers. From the test topology.txt:
> >   +----------+          +----------+          +----------+
> >   |QDR.A     |          |QDR.B     |          |QDR.C     |
> >   |port:     |          |port:     |          |port:     |
> >   | 20001    |--------->| 20002    |--------->| 20003    |
> >   |          |          |          |          |          |
> >   |          |          |          |          |          |
> >   +----------+          +----------+          +----------+
> >
> >  * The direction of the arrow shows the direction of the connection setup
> >    Connector --> Listener
> >
> > To each of the config files in this example I've added a listener:
> >
> > listener {
> >     addr: 0.0.0.0
> >     port: 5672
> >     sasl-mechanisms: ANONYMOUS
> > }
> >
> > with the port incremented to 5673 and 5674 in config files B and C (so it
> > can be run on a single machine).
> >
> > I'm using drain/spout to send messages with the following syntax:
> > drain --connection-options {protocol:amqp1.0} -b 0.0.0.0:5672 -f
> myAddress
> > spout --connection-options {protocol:amqp1.0} -b 0.0.0.0:5674 myAddress
> >
> > By varying the port number I can of course control which router the
> > messages are being sent/received from.
> >
> > When the drain process connects I can see the mobile address registered
> on
> > all three routers. Sending messages via any pair of adjacent routers
> works
> > yet I am not able to send an address from router A to router C or visa
> > versa - spout does not return, presumably since it has not had
> confirmation
> > of delivery.
> >
> > Am I doing something wrong?
> >
> > Thanks
> >
> > Chris
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>


-- 

*Chris Richardson*, System Architect
cr@fourc.eu


*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
<http://www.fourc.eu/>*

*Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
<http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
<http://bit.ly/fourctw>!*

Re: Dispatch router multi-hop topology

Posted by Ted Ross <tr...@redhat.com>.
Hi Chris,

You may have run afoul of
https://issues.apache.org/jira/browse/DISPATCH-1 which was fixed after 0.2.

Spout doesn't set the "to" field in the messages it sends, it puts the
address in the target of the link.

You can work around this by adding the following to the spout command
line:  --property x-amqp-to=myAddress

Alternatively, you can try running Dispatch from trunk (you will need
Proton 0.7 for this).

-Ted

On 06/17/2014 04:59 AM, Chris Richardson wrote:
> Hi,
> 
> I'm trying to get an example of a multi-hop topology working with
> qpid-dispatch 0.2 built against qpid-proton 0.28. The scenario is probably
> most simply described by plagiarising the config files from the
> tests/config-3-linear directory, which sets up a series of 3 sequentially
> connected routers. From the test topology.txt:
>   +----------+          +----------+          +----------+
>   |QDR.A     |          |QDR.B     |          |QDR.C     |
>   |port:     |          |port:     |          |port:     |
>   | 20001    |--------->| 20002    |--------->| 20003    |
>   |          |          |          |          |          |
>   |          |          |          |          |          |
>   +----------+          +----------+          +----------+
> 
>  * The direction of the arrow shows the direction of the connection setup
>    Connector --> Listener
> 
> To each of the config files in this example I've added a listener:
> 
> listener {
>     addr: 0.0.0.0
>     port: 5672
>     sasl-mechanisms: ANONYMOUS
> }
> 
> with the port incremented to 5673 and 5674 in config files B and C (so it
> can be run on a single machine).
> 
> I'm using drain/spout to send messages with the following syntax:
> drain --connection-options {protocol:amqp1.0} -b 0.0.0.0:5672 -f myAddress
> spout --connection-options {protocol:amqp1.0} -b 0.0.0.0:5674 myAddress
> 
> By varying the port number I can of course control which router the
> messages are being sent/received from.
> 
> When the drain process connects I can see the mobile address registered on
> all three routers. Sending messages via any pair of adjacent routers works
> yet I am not able to send an address from router A to router C or visa
> versa - spout does not return, presumably since it has not had confirmation
> of delivery.
> 
> Am I doing something wrong?
> 
> Thanks
> 
> Chris
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org