Thanks guys, I think this explains it nicely but I'll play around with
waypoints some more to ensure I fully understand it. Having read your
description I think that it's a nomenclature issue.

To me prefixing "waypoints" and "phases" with "processing" i.e. processing
phases and processing waypoints makes them clearer in my mind.

Cheers
Noel

On Thu, Nov 19, 2015, 08:00 aconway <acon...@redhat.com> wrote:

> On Sun, 2015-11-15 at 10:51 +0000, Noel OConnor wrote:
> > Hi,
> > I've struggling with understanding the context of phases in waypoints
> > and
> > how you would use them.
> > Are phases an AMQP or dispatch routes concept ?
>
> Dispatch only, more below...
>
> > I've taken a look at the code and found the following
> >
> >  >>* A waypoint sends/receives messages to/from an external entity
> > such as a
> >  >>* broker as part of a multi-phase address.
> >
> > Is a multi-phase address something line a/b/c/d ?
> >
> >  >>* An address can have multiple phases. Each phase acts like a
> > separate
> > address,
> >  >>* but sharing the same address string.
> >
> >  >>* Phases are not visible to normal senders/receivers, they are set
> > by
> >  >>* waypoints. Messages from normal senders go to the phase=0
> > address.
> > Normal
> >  >>* subscribers subscribe to the highest phase defined for the
> > address.
> >
> >  >>* A waypoint takes messages for its in-phase and sends them to the
> > external
> >  >>* entity. Messages received from the external entity are given the
> > waypoint's
> >  >>* out-phase. Waypoints can be "chained" with the out-phase of one
> > equal
> > to the
> >  >>* in-phase for the next. Thus waypoints provide a way to route
> > messages
> > via
> >  >>* multiple external entities between a sender and a subscriber
> > using the
> > same
> >  >>* address.
> >
> > An example of the above would be great ?
> > Are waypoints a kind of orchestration scheme i.e. routing from one
> > broker
> > to another ?
>
> Yes, exactly! Waypoints are a powerful feature but lots of people find
> them confusing so we may change the way they are expressed in future to
> be more easily understood.
>
> Phases are internal to dispatch, they represent different "stages" in
> the lifecycle of a message associated with just *one* externally
> -visible AMQP address.
>
> Simple example: exposing an AMQP queue as a dispatch address "Q". You
> want messages to the address to go onto the queue, and subscribers to
> the address to subscribe to the queue. You don't want messages sent to
> the dispatch address to be sent directly to the subscribers, bypassing
> the queue. So you have a waypoint with 2 phases. Messages arriving from
> outside of dispatch are Q-0, so they get sent to the queue by the
> waypoint. The waypoint defines a second phase Q-1, for messages coming
> *from* the queue. Subscribers subscribe to Q-1. The external processes
> only know about "Q", the phases are internal to the dispatch network.
>
> More complex example is a "distributed queue", there's code in
> tests/system_tests_broker.py. Senders and subscribers to a single
> external address get load-balanced over a set of broker queues
> automatically.
>
> All the examples so far end up needing only 2 phases, so it's possible
> that allowing N phases is overkill and we can simplify the presentation
> a bit.
>
> Cheers,
> Alan.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
>
>

Reply via email to