You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/database-engine/service-broker/broker-system-messages.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,9 @@ In addition to the application-defined message types specified in the contract,
24
24
25
25
## Error Messages
26
26
27
-
When a remote service ends a dialog with an error or the local broker detects an unrecoverable error in a dialog, the local broker creates an Error Message. Error messages are of message type **https://schemas.microsoft.com/SQL/ServiceBroker/Error**. Error messages are validated as well-formed XML.
27
+
When a remote service ends a dialog with an error or the local broker detects an unrecoverable error in a dialog, the local broker creates an Error Message. Error messages are of message type `https://schemas.microsoft.com/SQL/ServiceBroker/Error`. Error messages are validated as well-formed XML.
28
28
29
-
The XML document that is contained in an error message uses the namespace **https://schemas.microsoft.com/SQL/ServiceBroker**. The root element of the document has the local name **Error**, and contains an element named **Code** and an element named **Message**. The **Code** element holds an integer value. The **Message** element holds the human-readable text of the message.
29
+
The XML document that is contained in an error message uses the namespace `https://schemas.microsoft.com/SQL/ServiceBroker`. The root element of the document has the local name **Error**, and contains an element named **Code** and an element named **Message**. The **Code** element holds an integer value. The **Message** element holds the human-readable text of the message.
30
30
31
31
For example, an error message generated by a service that processes expense reports might contain the following XML (reformatted for readability):
32
32
@@ -47,13 +47,13 @@ When an error message arrives for a dialog, the broker raises an error if an app
47
47
48
48
## End Dialog Messages
49
49
50
-
When an application ends a dialog without specifying an error, the local broker sends an End Dialog message to the remote broker. End Dialog messages are of message type **https://schemas.microsoft.com/SQL/ServiceBroker/EndDialog**.
50
+
When an application ends a dialog without specifying an error, the local broker sends an End Dialog message to the remote broker. End Dialog messages are of message type `https://schemas.microsoft.com/SQL/ServiceBroker/EndDialog`.
51
51
52
52
End Dialog messages are empty messages. A receive operation receives an End Dialog message in the order in which the message arrived on the queue.
53
53
54
54
## Dialog Timer Messages
55
55
56
-
Dialog timer messages indicate that the conversation timer on a dialog has expired. These messages are of message type **https://schemas.microsoft.com/SQL/ServiceBroker/DialogTimer**. A conversation timer is specific to one side of the conversation; Service Broker never sends a dialog timer message to the other side of the conversation.
56
+
Dialog timer messages indicate that the conversation timer on a dialog has expired. These messages are of message type `https://schemas.microsoft.com/SQL/ServiceBroker/DialogTimer`. A conversation timer is specific to one side of the conversation; Service Broker never sends a dialog timer message to the other side of the conversation.
57
57
58
58
Dialog timer messages are empty messages. A receive operation receives the dialog timer message before any other message for that dialog, regardless of the order in which the time-out message arrived on the queue.
59
59
@@ -65,4 +65,4 @@ Dialog timer messages are empty messages. A receive operation receives the dialo
Copy file name to clipboardExpand all lines: docs/database-engine/service-broker/creating-a-remote-service-binding.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ When a conversation is initiated, Service Broker checks to see whether a remote
23
23
24
24
## Requesting Remote Service Binding
25
25
26
-
Requests for remote service bindings use the message type **https://schemas.microsoft.com/SQL/ServiceBroker/BrokerConfigurationNotice/MissingRemoteServiceBinding**. The message is in XML format, and contains the name of the service for which remote service binding information should be available.
26
+
Requests for remote service bindings use the message type `https://schemas.microsoft.com/SQL/ServiceBroker/BrokerConfigurationNotice/MissingRemoteServiceBinding`. The message is in XML format, and contains the name of the service for which remote service binding information should be available.
27
27
28
28
For example, the following message is a request for a remote service binding to the service **http://Adventure-Works.com/Elsewhere**:
29
29
@@ -42,4 +42,4 @@ In either case, the application ends the conversation. Service Broker sends one
42
42
## See also
43
43
44
44
-[CREATE REMOTE SERVICE BINDING (Transact-SQL)](../../t-sql/statements/create-remote-service-binding-transact-sql.md)
Copy file name to clipboardExpand all lines: docs/database-engine/service-broker/creating-service-broker-objects.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ To create the objects for a service, do the following:
48
48
49
49
4. Create a service. The service definition specifies the queue that the service uses and the contracts for which this service is the target.
50
50
51
-
In most cases, you create the target service and then use the contracts and message types created for the target service to create an initiating service. In some cases, however, you may create a target service for an initiating service that is already defined. In these cases, the target service uses the message types and contracts that the initiating service uses. For example, if you are creating a target service to receive event notifications, you use the contract **https://schemas.microsoft.com/SQL/Notifications/PostEventNotification**, because this is the contract that the initiating service uses.
51
+
In most cases, you create the target service and then use the contracts and message types created for the target service to create an initiating service. In some cases, however, you may create a target service for an initiating service that is already defined. In these cases, the target service uses the message types and contracts that the initiating service uses. For example, if you are creating a target service to receive event notifications, you use the contract `https://schemas.microsoft.com/SQL/Notifications/PostEventNotification`, because this is the contract that the initiating service uses.
52
52
53
53
## Managing Object Definitions
54
54
@@ -81,4 +81,4 @@ If your application involves sending messages between SQL Server instances, it i
Copy file name to clipboardExpand all lines: docs/database-engine/service-broker/dialog-conversations.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ Applications are responsible for indicating when they are finished with a dialog
45
45
46
46
A conversation timer allows an application to receive a message at a specific time. When the conversation timer expires, SQL Server inserts a message for the conversation into the queue for the conversation, at the endpoint that started the conversation timer. An application can use a conversation timer for any purpose. One common use for a conversation timer is to respond to delays in responses from the remote service. Another common use is to create a service that sends messages to the remote service at set intervals. For example, a service might use a conversation timer to report on the current state of SQL Server every few minutes. Applications can also use a conversation timer to activate a stored procedure at a certain time. This allows Service Broker to support scheduled activities.
47
47
48
-
Each participant in a conversation can set one conversation timer per conversation. The conversation timer is not shared with the other participant, and the conversation timer does not affect the lifetime of the conversation. Instead, when the timer expires, the local Service Broker adds a time-out message to the queue for the local service. A time-out message has the type name **https://schemas.microsoft.com/SQL/ServiceBroker/DialogTimer**
48
+
Each participant in a conversation can set one conversation timer per conversation. The conversation timer is not shared with the other participant, and the conversation timer does not affect the lifetime of the conversation. Instead, when the timer expires, the local Service Broker adds a time-out message to the queue for the local service. A time-out message has the type name `https://schemas.microsoft.com/SQL/ServiceBroker/DialogTimer`
49
49
50
50
## See also
51
51
@@ -55,4 +55,4 @@ Each participant in a conversation can set one conversation timer per conversati
Copy file name to clipboardExpand all lines: docs/database-engine/service-broker/handling-service-broker-error-messages.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Use the WITH ERROR clause of the END CONVERSATION statement to report applicatio
33
33
34
34
The END CONVERSATION WITH ERROR statement:
35
35
36
-
- Generates a Service Broker system error message and sends it to the remote side of the conversation. The error messages use the system-defined **https://schemas.microsoft.com/SQL/ServiceBroker/Error** message type.
36
+
- Generates a Service Broker system error message and sends it to the remote side of the conversation. The error messages use the system-defined `https://schemas.microsoft.com/SQL/ServiceBroker/Error` message type.
37
37
38
38
- Ends the local side of the conversation.
39
39
@@ -63,15 +63,15 @@ Application code receiving messages from Service Broker conversations must have
63
63
64
64
- Error messages generated by an application that uses an application-defined error message type.
65
65
66
-
- Error messages generated by an application that uses the WITH ERROR clause of the END CONVERSATION statement. These error messages use the **https://schemas.microsoft.com/SQL/ServiceBroker/Error** message type and have a positive number in the **Code** element.
66
+
- Error messages generated by an application that uses the WITH ERROR clause of the END CONVERSATION statement. These error messages use the `https://schemas.microsoft.com/SQL/ServiceBroker/Error` message type and have a positive number in the **Code** element.
67
67
68
-
- Error messages generated by Service Broker. These error messages use the **https://schemas.microsoft.com/SQL/ServiceBroker/Error** message type and have a negative number in the **Code** element. Service Broker creates an **Error** message when an error makes it impossible for Service Broker to continue the conversation. For example, Service Broker cannot locate the destination service because the service does not exist in the current instance and there is no entry for the service in the routing table. In this situation, Service Broker creates an **Error** message for the conversation.
68
+
- Error messages generated by Service Broker. These error messages use the `https://schemas.microsoft.com/SQL/ServiceBroker/Error` message type and have a negative number in the **Code** element. Service Broker creates an **Error** message when an error makes it impossible for Service Broker to continue the conversation. For example, Service Broker cannot locate the destination service because the service does not exist in the current instance and there is no entry for the service in the routing table. In this situation, Service Broker creates an **Error** message for the conversation.
69
69
70
70
The result set returned by the RECEIVE statement contains a **message_type_name** column. Code that receives Service Broker messages typically uses **message_type_name** to route each message to code that processes the associated message type.
71
71
72
72
The exact logic a program follows to handle the error depends on the application. One example is a program that uses message retention and requires compensating transactions when the task fails. When an error is received, the program queries the queue for the messages that have already been processed, performs compensating transactions, and then ends the conversation. In contrast, if the program only has to record that an error occurred, the program logs the error to a logging table and ends the conversation.
73
73
74
-
The **Code** element of the **https://schemas.microsoft.com/SQL/ServiceBroker/Error** message contains the error code. **Error** messages created by an application that uses END CONVERSATION WITH ERROR have a positive value for the error code. **Error** messages generated by Service Broker contain negative values for the error code. The **Code** value in messages generated by Service Broker is just the negated value of the error that caused the **Error** message. For example, when an XML validation error (error code 9615) occurs, the Database Engine creates an **Error** message that has a **Code** element that contains the value **-9615**.
74
+
The **Code** element of the `https://schemas.microsoft.com/SQL/ServiceBroker/Error` message contains the error code. **Error** messages created by an application that uses END CONVERSATION WITH ERROR have a positive value for the error code. **Error** messages generated by Service Broker contain negative values for the error code. The **Code** value in messages generated by Service Broker is just the negated value of the error that caused the **Error** message. For example, when an XML validation error (error code 9615) occurs, the Database Engine creates an **Error** message that has a **Code** element that contains the value **-9615**.
75
75
76
76
Once an application receives an **Error** message, the program can no longer send messages on that conversation. The application handles the error and then ends its side of the conversation. If an application receives an application-defined error message type, the conversation is still available unless the remote part of the application also ran END CONVERSATION.
77
77
@@ -83,4 +83,4 @@ Error handling routines should be coded in such a way as to prevent poison messa
83
83
-[CREATE MESSAGE TYPE (Transact-SQL)](../../t-sql/statements/create-message-type-transact-sql.md)
Copy file name to clipboardExpand all lines: docs/database-engine/service-broker/how-to-retrieve-information-from-a-service-broker-error-message-transact-sql.md
A message of type **https://schemas.microsoft.com/SQL/ServiceBroker/Error** is a Service Broker error message. Messages of this type are XML documents that contain a numeric code for the error and a description of the error.
17
+
A message of type `https://schemas.microsoft.com/SQL/ServiceBroker/Error` is a Service Broker error message. Messages of this type are XML documents that contain a numeric code for the error and a description of the error.
18
18
19
19
## To retrieve the information from a Service Broker error message
Copy file name to clipboardExpand all lines: docs/database-engine/service-broker/service-broker-dynamic-routing.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,9 @@ When Service Broker cannot find a route for a conversation, Service Broker check
24
24
25
25
## Creating the Broker Configuration Notice Service
26
26
27
-
To create a service for dynamic routing, create a service named **SQL/ServiceBroker/BrokerConfiguration** that accepts conversations on the contract **https://schemas.microsoft.com/SQL/ServiceBroker/BrokerConfigurationNotice**. You then create a route to the service in the routing table for database that will use dynamic routing.
27
+
To create a service for dynamic routing, create a service named **SQL/ServiceBroker/BrokerConfiguration** that accepts conversations on the contract `https://schemas.microsoft.com/SQL/ServiceBroker/BrokerConfigurationNotice`. You then create a route to the service in the routing table for database that will use dynamic routing.
28
28
29
-
Requests for routes use the message type **https://schemas.microsoft.com/SQL/ServiceBroker/BrokerConfigurationNotice/MissingRoute**. The message is in XML format, and contains the name of the service for which routing information should be available.
29
+
Requests for routes use the message type `https://schemas.microsoft.com/SQL/ServiceBroker/BrokerConfigurationNotice/MissingRoute`. The message is in XML format, and contains the name of the service for which routing information should be available.
30
30
31
31
For example, the following message is a request for a route to the service http://Adventure-Works.com/Elsewhere:
32
32
@@ -48,4 +48,4 @@ Notice that, in either case, the application that implements the Broker Configur
0 commit comments