question

Peter.Neilson avatar image
Peter.Neilson asked

Is it safe to remove a 'ServiceEcho' contract from a user-defined service-broker service

I have 'inherited' a set of user-defined service-broker messages, contracts, services and queues which were implemented by a developer who has now left the organisation. One of the service definitions is as follows: CREATE SERVICE [MyService] AUTHORIZATION [dbo] ON QUEUE [dbo].[MyQueue] ( [ http://schemas.microsoft.com/SQL/ServiceBroker/ServiceEcho], [MyContract] ) The queue and contract ('MyQueue' and 'MyContract') are separately defined, with 'MyContract' referring to a custom message type with no validation. In the run-time environment, I cannot see this service and queue being used in any context other than to send and receive a simple custom XML message about data changes. My question, then, is in two parts: 1. does the first of these contracts in the service definition (the Microsoft contract [ http://schemas.microsoft.com/SQL/ServiceBroker/ServiceEcho]) - actually mean anything useful; can it be used to do something different from simply sending or receiving the user-defined XML message? 2. is it likely to be safe to remove it from the service definition?
sql-server-2008-r2service-broker
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
sqlaj 1 avatar image
sqlaj 1 answered
I have worked with SB in a limited capacity. Mainly I used it to setup database and server auditing. I can't answer your question definitively but I found this while searching the internet. "Changing the validation of a message type does not affect messages that have already been delivered to a queue." From here: http://msdn.microsoft.com/en-us/library/ms187345(v=sql.100).aspx If you haven't already looked at this information: http://msdn.microsoft.com/en-us/library/ms166029(v=sql.105).aspx It provides a great overview. This provides some good information on how to develop using SB and what I used as a guide when setting up what I mentioned about auditing. http://msdn.microsoft.com/en-us/library/bb522908(v=sql.100).aspx Another option to consider is script out the Queue and Service and run them on a pre-production or development system and see what you can figure out. You may even consider disabling the Queue and seeing what results. Granted, not the best option on a production system but if planned well enough could have minimal effect.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.