Skip to content

Bugfix: incorrect subscription URI when unsubscribing. - #9

Open
thales-productive-bjorn wants to merge 1 commit into
arrowhead-f:feature/refactored+commonfrom
thales-productive-bjorn:feature/refactored+common
Open

thales-productive-bjorn wants to merge 1 commit into
arrowhead-f:feature/refactored+commonfrom
thales-productive-bjorn:feature/refactored+common

Conversation

@thales-productive-bjorn

Copy link
Copy Markdown

Unsubscribing without the fix results in a path with 2 times "subscription" in the URI (so "subscription/subscription/type//consumer" whereas it should be "subscription/type//consumer").

This can be verified by running the "client-demo-subscriber" project (from the sos-examples).
When running that example and then quit the subscriber application will result in the following exception:

Exception in thread "Thread-0" eu.arrowhead.common.exception.ArrowheadRuntimeException: eventhandler/subscription/subscription/type/hello/consumer/client-demo-subscriber is not a valid path!
        at eu.arrowhead.common.api.clients.HttpClient.check(HttpClient.java:206)
        at eu.arrowhead.common.api.clients.HttpClient.send(HttpClient.java:152)
        at eu.arrowhead.common.api.clients.OrchestrationStrategy.send(OrchestrationStrategy.java:70)
        at eu.arrowhead.common.api.clients.OrchestrationStrategy$Never.request(OrchestrationStrategy.java:103)
        at eu.arrowhead.common.api.clients.HttpClient.request(HttpClient.java:115)
        at eu.arrowhead.common.api.clients.HttpClient.request(HttpClient.java:95)
        at eu.arrowhead.common.api.clients.core.EventHandlerClient.unsubscribe(EventHandlerClient.java:140)
        at eu.arrowhead.common.api.clients.core.EventHandlerClient.lambda$unsubscribe$0(EventHandlerClient.java:155)
        at java.lang.Iterable.forEach(Iterable.java:75)
        at eu.arrowhead.common.api.clients.core.EventHandlerClient.unsubscribe(EventHandlerClient.java:155)
        at java.util.HashMap.forEach(HashMap.java:1289)
        at eu.arrowhead.common.api.clients.core.EventHandlerClient.unsubscribe(EventHandlerClient.java:163)
        at java.util.HashMap.forEach(HashMap.java:1289)
        at eu.arrowhead.common.api.clients.core.EventHandlerClient.unsubscribeAll(EventHandlerClient.java:171)
        at eu.arrowhead.common.api.ArrowheadApplication.lambda$start$0(ArrowheadApplication.java:172)
        at java.lang.Thread.run(Thread.java:748)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant