Skip to content

Provide better feedback on misconfigured queues #5095

@DavidBoike

Description

@DavidBoike

Describe the suggested improvement

Is your improvement related to a problem? Please describe.

If an endpoint misconfigures ServiceControl queues such as in the following example:

endpointConfiguration.SendHeartbeatTo("Particular.Monitoring");

Then heartbeat messages, which are supposed to go to the ServiceControl queue (i.e. Particular.ServiceControl end up getting sent to the Monitoring queue, and because that app isn't prepared to receive that kind of data, it results in an exception:

NServiceBus.MessageDeserializationException: An error occurred while attempting to extract logical messages from incoming physical message d67cde72-c41d-4841-9bab-82bf8a589d1b ---> System.Exception: The System.Text.Json message serializer requires message types to be defined.

This is not ideal. It is exacerbated because the documentation mostly makes references to "the ServiceControl queue" in the abstract, because the actual queue name is dependent on the instance name that was chosen during installation.

Describe the suggested solution

When failing to process a message, a subsystem should be able to do a cursory inspection of the message headers, and can probably throw a more informed exception like:

Heartbeat message from ENDPOINTNAME@SERVERNAME received by the Monitoring instance. Heartbeat messages should be routed to the ServiceControl queue processed by the Primary/Error instance, which is commonly Particular.ServiceControl, but is determined by the exact name of the ServiceControl instance. The configuration for ENDPOINTNAME@SERVERNAME should be fixed to send heartbeat messages to the correct destination.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions