activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Baert (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ARTEMIS-1556) Cannot Recover AMQP Subscription Existing On Remote Cluster Member
Date Wed, 13 Dec 2017 18:31:01 GMT

     [ https://issues.apache.org/jira/browse/ARTEMIS-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Todd Baert updated ARTEMIS-1556:
--------------------------------
    Description: 
Assuming broker1 and broker2 exist in a cluster, if an AMQP Source constituting a shared durable
subscription (having capabilities "shared", "global" and "topic") is created on broker1, and
attempted to be recovered from a client connected to broker2 (by creating an attach frame
with a null source, with desired capabilities  "shared", "global" and "topic"), an Amqp.AmqpException
is thrown.

In a cluster, shouldn't it be possible to recover subscriptions that exist on another broker?
Shouldn't the search for this subscription occur on all cluster members?

I don't believe this is happening. It looks like we just search locally (not sure about this)
- but certainly the exception is thrown and the sub is not recovered:

See code below from org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerSenderContext
(comments are not my own, they are from source):
{code:java}
      if (source == null) {
         // Attempt to recover a previous subscription happens when a link reattach happens
on a
         // subscription queue
         String clientId = getClientId();
         String pubId = sender.getName();
         global = hasRemoteDesiredCapability(sender, GLOBAL);
         queue = createQueueName(connection.isUseCoreSubscriptionNaming(), clientId, pubId,
true, global, false);
         QueueQueryResult result = sessionSPI.queueQuery(queue, RoutingType.MULTICAST, false);
         multicast = true;
         routingTypeToUse = RoutingType.MULTICAST;

         // Once confirmed that the address exists we need to return a Source that reflects
         // the lifetime policy and capabilities of the new subscription.
         if (result.isExists()) {
{code}




  was:
Assuming broker1 and broker2 exist in a cluster, if an AMQP Source constituting a shared durable
subscription (having capabilities "shared", "global" and "topic") is created on broker1, and
attempted to be recovered from a client connected to broker2 (by creating an attach frame
with a null source, with desired capabilities  "shared", "global" and "topic"), an Amqp.AmqpException
is thrown.

In a cluster, shouldn't it be possible to recover subscriptions that exist on another broker?
Shouldn't the search for this subscription occur on all cluster members?

I don't believe this is happening. It looks like we just search locally:

See code below from ProtonServerSenderContext (comments are not my own, they are from source):
{code:java}
      if (source == null) {
         // Attempt to recover a previous subscription happens when a link reattach happens
on a
         // subscription queue
         String clientId = getClientId();
         String pubId = sender.getName();
         global = hasRemoteDesiredCapability(sender, GLOBAL);
         queue = createQueueName(connection.isUseCoreSubscriptionNaming(), clientId, pubId,
true, global, false);
         QueueQueryResult result = sessionSPI.queueQuery(queue, RoutingType.MULTICAST, false);
         multicast = true;
         routingTypeToUse = RoutingType.MULTICAST;

         // Once confirmed that the address exists we need to return a Source that reflects
         // the lifetime policy and capabilities of the new subscription.
         if (result.isExists()) {
{code}





> Cannot Recover AMQP Subscription Existing On Remote Cluster Member 
> -------------------------------------------------------------------
>
>                 Key: ARTEMIS-1556
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1556
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.4.0
>         Environment: Latest broker snapshot running on fedora 26. AMQP .Net Lite client.

>            Reporter: Todd Baert
>
> Assuming broker1 and broker2 exist in a cluster, if an AMQP Source constituting a shared
durable subscription (having capabilities "shared", "global" and "topic") is created on broker1,
and attempted to be recovered from a client connected to broker2 (by creating an attach frame
with a null source, with desired capabilities  "shared", "global" and "topic"), an Amqp.AmqpException
is thrown.
> In a cluster, shouldn't it be possible to recover subscriptions that exist on another
broker? Shouldn't the search for this subscription occur on all cluster members?
> I don't believe this is happening. It looks like we just search locally (not sure about
this) - but certainly the exception is thrown and the sub is not recovered:
> See code below from org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerSenderContext
(comments are not my own, they are from source):
> {code:java}
>       if (source == null) {
>          // Attempt to recover a previous subscription happens when a link reattach happens
on a
>          // subscription queue
>          String clientId = getClientId();
>          String pubId = sender.getName();
>          global = hasRemoteDesiredCapability(sender, GLOBAL);
>          queue = createQueueName(connection.isUseCoreSubscriptionNaming(), clientId,
pubId, true, global, false);
>          QueueQueryResult result = sessionSPI.queueQuery(queue, RoutingType.MULTICAST,
false);
>          multicast = true;
>          routingTypeToUse = RoutingType.MULTICAST;
>          // Once confirmed that the address exists we need to return a Source that reflects
>          // the lifetime policy and capabilities of the new subscription.
>          if (result.isExists()) {
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message