Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] Exception swallowed when subscription transfer fails

Jose,

What version did you migrate from?

I will look into why the transfer failure notification isn't occurring at the "Managed" API layer... it seems to be getting lost somewhere on the way.

On Tue, Jun 22, 2021 at 5:20 AM José García Hernández <jgarcia@xxxxxxxxxxx> wrote:
Hi Kevin!

Thanks for your answer.

We are creating all the subscriptions using this:

                final ManagedSubscription managedSubscription =
                    ManagedSubscription.create(opcClient, getConfig().getPublishingInterval());

                managedSubscription.addDataChangeListener(consumersService.createConsumer());
                managedSubscription.addStatusListener(statusesService.createListener());

There are 2 classes attached to this email where you can check it:

 - SubscriptionsService.getManagedSubscription() -> Uses an active subscription if it manages less than "${maxSubscriptionItems}" (configured value), or creates a new one.

 - StatusesService.createListener() -> The listener we are using, with onSubscriptionTransferFailed and onSubscriptionStatusChanged.

This behaviour was working until we migrated to 0.6.0 (if I remember well). I think we spoke a bit about this in a previous email.

Regards.

El mar, 22 jun 2021 a las 14:00, Kevin Herron (<kevinherron@xxxxxxxxx>) escribió:
Jose,

Based on those logs I would expect onSubscriptionTransferFailed to be invoked 3 times, one for each of the subscriptions that failed to transfer and received a Bad_SubscriptionIdInvalid operation result.


If you are not seeing these calls happen then perhaps you do not actually have a listener registered at the time these log statements occur.

On Tue, Jun 22, 2021 at 1:11 AM José García Hernández <jgarcia@xxxxxxxxxxx> wrote:
Hi all!

We are testing our server capabilities using an OPC that restars itself every hour. Because of that we are expecting the event 'onSubscriptionTransferFailed' to happen, but we see the below instead:

DEBUG: TransferSubscriptions supported: StatusCode{name=Good, value=0x00000000, quality=good}
DEBUG: TransferSubscriptions results: [id=1845337829/Bad_SubscriptionIdInvalid, id=1845337828/Bad_SubscriptionIdInvalid, id=1845337830/Bad_SubscriptionIdInvalid]
DEBUG: TransferSubscriptions succeeded

Is it possible to have that 'Bad_SubscriptionIdInvalid' (or others) not being swallowed and throwing 'onSubscriptionTransferFailed'?

Log attached.

Regards.
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top