Ability to specify the name of Service Broker

Oct 2, 2015 at 10:38 AM
Edited Oct 2, 2015 at 10:40 AM
Could you please implement additional constructor with parameter name of Service Broker?
I think It will be very useful.
There are cases when the server restarts. And I do not want to create new objects when the server now is turned on.
Yes we can invoke stop method of "tableDependency.Stop()". But it's don't help me if the Web-server was shutdown(poweroff)

So I want to use those that already exist.
Oct 2, 2015 at 11:02 AM
Hello tolik51.
Thanks for using SqlTableDependency.

Currently it is not possible, because we are working to remove the NOT manageability of VARBINARY(MAX), VARCHAR(MAX), NVARCHAR(MAX) and XML
This is a huge change that take time.

However, we will analyze your request later.

I let you know soon.

Oct 6, 2015 at 7:42 AM
Edited Oct 6, 2015 at 7:43 AM
Hello tolik51.

Do you still need to reuse previous Service Broker and Queue ?
Oct 6, 2015 at 8:07 AM
Shure. It will be very useful.
Oct 6, 2015 at 8:14 AM

We will plan this new functionality for the next release.
Oct 6, 2015 at 11:03 AM
That's great news
Oct 7, 2015 at 9:06 AM
Let's say I want to there was only one Service Broker, but I want to be notified with a few tables.
If I understand correctly, then the current implementation, it will create several Service Broker. Am I right?
Oct 7, 2015 at 1:12 PM

Yes. I understoond not correctly your request:

You'd like to have a constructor as:

tableDependency = new SqlTableDependency<Check_Model>(
   _name service broker_
   new List<string> { "First Name" },
   _automaticDatabaseObjectsTeardown_ );

Exact ?
Oct 7, 2015 at 1:21 PM
Oct 7, 2015 at 1:31 PM
Is not a big problem....

There will be only one constructor with the following syntax:

public SqlTableDependency(
string connectionString, 
string tableName, 
ModelToTableMapper<T> mapper = null, 
IEnumerable<string> updateOf = null, 
bool automaticDatabaseObjectsTeardown = true, 
string namingConventionForDatabaseObjects = null)
When you pass a value for the last parameter, SqlTableDependency will look for service broker with that name.
If is not present it will create
If it is present it will use it.
If no value for namingConventionForDatabaseObjects the will use its own internal naming convention.

Ok ?
Oct 7, 2015 at 1:35 PM
Yes, it is what we need
Oct 7, 2015 at 4:45 PM
Here it is version


Oct 8, 2015 at 7:54 AM
Oct 8, 2015 at 8:03 AM
Edited Oct 8, 2015 at 8:04 AM

Type: System.String (Default value null)
Used to define naming convention used to create all the database object (Service Broker, Queue, Trigger, Contract and Message Types).

Note: When you choose to specify you own naming convention, be aware that this can cause problems: two or more instance of same application will share the same databases queue. This means that the first SqlTableDependency accessing queue get the event notification while the second no, because the message it was already read. So, in order to avoid this situation, assign unique naming per SqlTableDependency instance.