How to fix Error 8428 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 8428 – “The message type is not found”

Why This Error Happens

Error 8428 occurs when a Service Broker conversation references a message type that does not exist in the message type catalog, typically because it was never created, was dropped, or exists in a different database/schema context than expected. This commonly happens after a database restore or migration where Service Broker objects (message types, contracts, services) were not fully scripted or synchronized, leaving dangling references. It can also occur due to case-sensitivity mismatches or incorrect fully-qualified naming when the SEND or CREATE CONTRACT statement executes.

Step-by-Step Resolution Guide

Step 1: Verify the Message Type Exists in the Target Database

  • Connect to the affected database using SQL Server Management Studio (SSMS) on Windows Server 2025 or Windows 11.
  • Run the following query to check existing message types:
SELECT name, validation FROM sys.service_message_types;
  • Confirm the exact name (including case and whitespace) referenced in your error matches an entry in this result set.
  • If missing, this confirms the message type was never created or was dropped inadvertently.

Step 2: Recreate the Missing Message Type and Associated Contract

  • If the message type is absent, recreate it using the original Service Broker deployment script:
CREATE MESSAGE TYPE [//YourNamespace/YourMessageType]
VALIDATION = WELL_FORMED_XML;
  • Re-associate it with its contract if needed:
CREATE CONTRACT [//YourNamespace/YourContract]
([//YourNamespace/YourMessageType] SENT BY INITIATOR);
  • Ensure namespace casing matches exactly what the application layer sends (Service Broker names are case-sensitive even on case-insensitive collations).

Step 3: Check for Cross-Database or Cross-Instance Reference Issues

  • If using Broker across multiple databases, verify ENABLE_BROKER is set:
SELECT name, is_broker_enabled FROM sys.databases WHERE name = 'YourDBName';
  • If disabled, enable it:
ALTER DATABASE [YourDBName] SET ENABLE_BROKER;
  • Confirm the Service Broker GUID matches between primary and mirrored/restored databases using sys.databases.service_broker_guid, and run ALTER DATABASE SET NEW_BROKER only if intentional reset is required.

Step 4: Review Deployment and Migration Scripts

  • Audit any DACPAC, BACPAC, or manual T-SQL deployment scripts used during migration to Windows Server 2025 for missing CREATE MESSAGE TYPE statements.
  • Re-run the full Service Broker object creation script in correct dependency order: Message Types → Contracts → Queues → Services.
  • Check SQL Server error logs at C:\Program Files\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQL\Log\ERRORLOG for related Broker initialization warnings.

Alternative or Verification Steps

  • After recreating objects, test by sending a sample message via BEGIN DIALOG and SEND ON CONVERSATION, then confirm it reaches the target queue without triggering Error 8428.
  • If the issue persists, drop and fully redeploy the entire Service Broker configuration (queues, services, contracts, message types) in a maintenance window, as partial object corruption may require a clean rebuild.