CREATE MESSAGE TYPE
defines message type (no row flow)
What changes
- Input
- catalog
- Output or change
- catalog: message type
Syntax at a glance
CREATE MESSAGE TYPE message_type_name [ AUTHORIZATION owner_name ] [ VALIDATION = { NONE | EMPTY | WELL_FORMED_XML | VALID_XML WITH SCHEMA COLLECTION schema_collection_name } ] [ ; ]
Work example
A Service Broker contract needs a message with a defined validation rule.
Write a synthetic payload and match its XML schema or validation mode to every sender and receiver.
Check your work Valid test messages pass and malformed payloads fail at the chosen validation boundary.
Open Microsoft Learn for full syntax, permissions, and details for your version.