This post relates to Team Foundation Server 2010, the Scrum for Team System version 3 process template and TFS event notifications.
In TFS you can setup notifications to be sent on events like Build complete and work item changes.
Introduced in the TFS 2010 release candidate is the ability to set a process delay time for notifications. By default the delay time is set to 2 minutes. This is intended to reduce the load on the TFS job agent process during periods of heavy load.
“2 Minute Notification Delay”
In the SfTS solution we use this change notification to trigger our event service updates. Unfortunately the new 2 minute delay means that we no longer get an instant notification of work item updates. This delay makes the event service slower to respond and can cause you to see the dreaded “TF237079” error message more often.
Luckily, there is a way to reduce / remove the notification delay.
Removing Job Service Notification Delay
In order to change the notification delay duration, you will need to add a data row to a table in the “Tfs_Configuation” database.
- Launch SSMS and connect to the TFS Database Engine.
- Run the following script:
USE Tfs_Configuration
GO
IF NOT EXISTS
(
SELECT *
FROM tbl_RegistryItems
WHERE ParentPath = '#\Service\Integration\Settings\'
AND ChildItem = 'NotificationJobDelay\'
)
BEGIN
INSERT INTO tbl_RegistryItems (ParentPath, ChildItem, RegValue)
VALUES ('#\Service\Integration\Settings\', 'NotificationJobDelay\', 0);
END
ELSE
BEGIN
UPDATE tbl_RegistryItems
SET RegValue = 0
WHERE ParentPath = '#\Service\Integration\Settings\'
AND ChildItem = 'NotificationJobDelay\'
END
-- Queue up an application update.
INSERT INTO tbl_NotificationQueue (EventClass, EventData)
VALUES
(
'0e9c44d7-52eb-4dca-b467-f1a4fe3c469a',
'<ArrayOfRegistryEntry>' +
'<RegistryEntry Path="#\Service\Integration\Settings\NotificationJobDelay\">' +
'<Value>0</Value></RegistryEntry></ArrayOfRegistryEntry>'
);
This sets the job service delay to zero and you get instant notifications once again.
Regards,
Crispin Parker,
Senior Practice Consultant,
EMC Consulting.
Edit: Apparently I was using a sledge hammer to open a peanut with my first post on this subject. I have now altered the SQL script to be a little more gentle on the TFS infrastructure. Chris Sidi’s post explains it all in great detail and even gives you a Powershell script to run in place of the above SQL.