Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mal-impl] LookupAddress failed to find local endpoint #9

Open
CesarCoelho opened this issue Dec 18, 2020 · 0 comments
Open

[mal-impl] LookupAddress failed to find local endpoint #9

CesarCoelho opened this issue Dec 18, 2020 · 0 comments

Comments

@CesarCoelho
Copy link
Collaborator

From @SteffenBamfaste :
If an unregistered provider sends publish messages to a broker, the broker will throw a MALInteractionException during the handling of the message and will send an error message back to the provider to inform about the error.

Upon reception of the error message the provider is logging "WARNING: lookupAddress failed to find local endpoint for EndPointPair{first=xyz-Parameter, second=null}". This behaviour doesn't influence the successful delivery of the error message but is not as desired.

Reply from @SamCooper :
It caused by the fact that a publish error is returned to the publisher as a PUBLISH messages with the isError flag set to true. This is all fine except the MessageReceive class does a lookupAddress call here:

https://github.com/esa/CCSDS_MO_MAL_IMPL/blob/master/src/main/java/esa/mo/mal/impl/MessageReceive.java#L201

as it should in a broker (as a broker is a MAL service provider for publish operations) except in the publisher we are not a MAL service provider so the lookup fails. If you look into the method it calls next (internalHandlePublish) there is a check to see if its an error message, and if it is it doesn't use the address argument.

The fix is to split the internalHandlePublish method into two, one for error messages and one for not error messages. The same applies actually to the NOTIFY message.

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

No branches or pull requests

1 participant