You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by mlange <ml...@anwb.nl> on 2018/04/16 11:30:20 UTC

QDR: transacted connections with multiple brokers

Hi all,

QDR has some limited support for transactions, seeing a special endpoint
$coordinator.
When one has QDR with only one broker behind it you can do a 

linkRoute {
  prefix: $coordinator
  dir: in
  conn: broker1
}

and the same, but then dir: out

However, this will work for one broker. But given the situation when one has
multiple brokers defined in one QDR, how can this be solved? Is there
something after $coordinator that can be used as prefix instead? Can QDR
tell which broker should get which transaction messages based on the
endpoint and to which broker those messages get linkRouted?




--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: QDR: transacted connections with multiple brokers

Posted by Gordon Sim <gs...@redhat.com>.
On 16/04/18 14:24, Alan Conway wrote:
> On Mon, Apr 16, 2018 at 9:10 AM, mlange <ml...@anwb.nl> wrote:
>> Agree with that one; a proper distributed TX would indeed be the best
>> solution; Couldn't find any issue in the Jira, are there plans to build
>> this? I think it would be a great addition.
>>
> 
> No immediate plans that I'm aware of. It has always been a potential
> feature but never at the top of the priority pile. By all means raise it,
> so we can track interest and maybe encourage someone to contribute some
> code.

Just for clarity, I don't see this (primarily) as a feature for the router.

A distributed transaction co-ordinator requires highly available state. 
It would therefore in my view be an additional component in the 
architecture (ideally based on some existing transaction coordinator).

Depending on the architecture of the solution, it might be that the 
router network does not need to do anything other than correctly 
propagate the transaction context along with transfers and dispositions 
(which it should already do) and perhaps route links for the 
co-ordinator (which again it can already do). If the co-ordinator was 
supposed to communicate with the resources through the router network, 
that might require some additional tweaks to the current router 
behaviour/feature set (at present I think it would have to use virtual 
hosts for each of the resources, with the link route for the controller 
defined appropriately).

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


Re: QDR: transacted connections with multiple brokers

Posted by mlange <ml...@anwb.nl>.
Done: https://issues.apache.org/jira/browse/DISPATCH-968



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: QDR: transacted connections with multiple brokers

Posted by Alan Conway <ac...@redhat.com>.
On Mon, Apr 16, 2018 at 9:10 AM, mlange <ml...@anwb.nl> wrote:

> aconway.rh wrote
> > On Mon, Apr 16, 2018 at 8:52 AM, Gordon Sim &lt;
>
> > gsim@
>
> > &gt; wrote:
> >
> >
> >>
> >> No. The problem is that a transaction could involve messages to/from
> >> different brokers, i.e. the transaction would become a distributed
> >> transaction. At present there is no support for that in the router.
> >
> >
> > We talked before about this: the idea was to start a non-distributed TX
> > based on the first broker involved, and abort it if it attempts to spread
> > to more brokers. However this approach would really create a lot of
> > potential for error and confusion, as well as complexity in the router.
> > The
> > conclusion was that such a partial solution would probably do more harm
> > than good, and if we want to move towards multi-broker TX we should put
> > our
> > effort into proper standard distributed TX and not some halfway solution.
> >
> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
>
> > users-unsubscribe@.apache
>
> >> For additional commands, e-mail:
>
> > users-help@.apache
>
> >>
> >>
>
> Agree with that one; a proper distributed TX would indeed be the best
> solution; Couldn't find any issue in the Jira, are there plans to build
> this? I think it would be a great addition.
>

No immediate plans that I'm aware of. It has always been a potential
feature but never at the top of the priority pile. By all means raise it,
so we can track interest and maybe encourage someone to contribute some
code.

Re: QDR: transacted connections with multiple brokers

Posted by mlange <ml...@anwb.nl>.
aconway.rh wrote
> On Mon, Apr 16, 2018 at 8:52 AM, Gordon Sim &lt;

> gsim@

> &gt; wrote:
> 
> 
>>
>> No. The problem is that a transaction could involve messages to/from
>> different brokers, i.e. the transaction would become a distributed
>> transaction. At present there is no support for that in the router.
> 
> 
> We talked before about this: the idea was to start a non-distributed TX
> based on the first broker involved, and abort it if it attempts to spread
> to more brokers. However this approach would really create a lot of
> potential for error and confusion, as well as complexity in the router.
> The
> conclusion was that such a partial solution would probably do more harm
> than good, and if we want to move towards multi-broker TX we should put
> our
> effort into proper standard distributed TX and not some halfway solution.
> 
> 
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: 

> users-unsubscribe@.apache

>> For additional commands, e-mail: 

> users-help@.apache

>>
>>

Agree with that one; a proper distributed TX would indeed be the best
solution; Couldn't find any issue in the Jira, are there plans to build
this? I think it would be a great addition.



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: QDR: transacted connections with multiple brokers

Posted by Alan Conway <ac...@redhat.com>.
On Mon, Apr 16, 2018 at 8:52 AM, Gordon Sim <gs...@redhat.com> wrote:

> On 16/04/18 12:30, mlange wrote:
>
>> Hi all,
>>
>> QDR has some limited support for transactions, seeing a special endpoint
>> $coordinator.
>> When one has QDR with only one broker behind it you can do a
>>
>> linkRoute {
>>    prefix: $coordinator
>>    dir: in
>>    conn: broker1
>> }
>>
>> and the same, but then dir: out
>>
>> However, this will work for one broker. But given the situation when one
>> has
>> multiple brokers defined in one QDR, how can this be solved? Is there
>> something after $coordinator that can be used as prefix instead? Can QDR
>> tell which broker should get which transaction messages based on the
>> endpoint and to which broker those messages get linkRouted?
>>
>
> No. The problem is that a transaction could involve messages to/from
> different brokers, i.e. the transaction would become a distributed
> transaction. At present there is no support for that in the router.


We talked before about this: the idea was to start a non-distributed TX
based on the first broker involved, and abort it if it attempts to spread
to more brokers. However this approach would really create a lot of
potential for error and confusion, as well as complexity in the router. The
conclusion was that such a partial solution would probably do more harm
than good, and if we want to move towards multi-broker TX we should put our
effort into proper standard distributed TX and not some halfway solution.


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

Re: QDR: transacted connections with multiple brokers

Posted by Gordon Sim <gs...@redhat.com>.
On 16/04/18 12:30, mlange wrote:
> Hi all,
> 
> QDR has some limited support for transactions, seeing a special endpoint
> $coordinator.
> When one has QDR with only one broker behind it you can do a
> 
> linkRoute {
>    prefix: $coordinator
>    dir: in
>    conn: broker1
> }
> 
> and the same, but then dir: out
> 
> However, this will work for one broker. But given the situation when one has
> multiple brokers defined in one QDR, how can this be solved? Is there
> something after $coordinator that can be used as prefix instead? Can QDR
> tell which broker should get which transaction messages based on the
> endpoint and to which broker those messages get linkRouted?

No. The problem is that a transaction could involve messages to/from 
different brokers, i.e. the transaction would become a distributed 
transaction. At present there is no support for that in the router.

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