Skip to content

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

@CesarCoelho

Description

@CesarCoelho

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions