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,

Is it possible for you to test this branch and verify it fixes your issue?

You should be able to check that branch out, run `mvn clean install`, then bump your dependencies to 0.6.2-SNAPSHOT and test. 


On Tue, Jun 22, 2021 at 12:30 PM José García Hernández <jgarcia@xxxxxxxxxxx> wrote:
Hi Kevin,

Thanks for the feedback and your attention! We'll be waiting for the new version.

Regards.  

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

It seems that this functionality has been broken in the "managed" API since its introduction. In particular, the onNotificationDataLost and onSubscriptionTransferFailed callbacks for ManagedSubscription.StatusListener are not properly hooked up internally and never get invoked.

I'm tracking this in https://github.com/eclipse/milo/issues/865 and will include the fix in the upcoming 0.6.2 release.

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

I added a small view of our code for the previous versions to this email, so you can check it. We used the subscriptions manager inside OpcUaClient.

Regards.

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

In the previous version you must not have been using the ManagedSubscription API then? Or you were adding a listener directly to the OpcUaSubscriptionManager instead?

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

We have been using your library since 0.4.1.

The last version we used before 0.6.0 was 0.5.4 and, if I remember well, transfers events were fine in that version. We are using 0.6.1 now.

Regards (and thanks).

El mar, 22 jun 2021 a las 14:57, Kevin Herron (<kevinherron@xxxxxxxxx>) escribió:
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
_______________________________________________
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
_______________________________________________
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