AbstractThe MessageHandler constructor
The type of the message which this MessageHandler handles.
Optionaloverrides: SubscriptionConfigCustom adjustments to overwrite Rascal subscription configuration settings.
Optionalmiddleware: OnMessageMiddleware<unknown>[]Middleware functions that should be executed for this specific message handler in addition to the global ones.
ReadonlymessageReadonlymiddlewareOptional ReadonlyoverridesOptionalmapFunction to map thrown error of unspecified type to a more human-readable error. Defining this mapping function eliminates the need to wrap onMessage contents into an explicit try-catch block.
AbstractonMain message handling function.
non-binary message payload (usually a json)
message with all related message metadata, including message envelope
acknowledgment or rejection callback that can be called to forcefully complete the message processing.
OptionalonFunction that will be called after the last retry attempt has failed. Useful for handling errors in an explicit way.
non-binary message payload (usually a json)
message with all related message metadata, including message envelope
error object that caused message processing to repeatedly fail
Base class for message handlers to handle incoming messages from the subscribed queue. *