0

I am designing an application that creates, uses and deletes MSMQ message queues. Each queue has custom properties which I am currently storing in a file.

I find this messy however and the whole system could go down if this file were to dissappear.

Is there a way I can bind custom properties (e.g. a property xml string) to the actual message queues which I am using?

Cheers, Shane

Shane
  • 875
  • 1
  • 6
  • 24

2 Answers2

0

While I don't know if that is possible you many not want your configuration to go down with the queue either. I would suggest some other kind of external storage mechanism. You could use another queue that holds messages for each queue configuration(just make sure it's a durable one). You could also look into using a database to hold your configuration and make sure that is backed up.

Adam Fyles
  • 6,030
  • 1
  • 23
  • 29
  • A database is the backup plan alright, but there is still no implicit connection. Also, if the message queue goes down it is not not a problem if the configuration goes down with it as the queue is dead anyway. – Shane Apr 13 '11 at 12:50
  • Ok, I thought you were using the config to create the queues themselves. May I ask what kind of information you are looking to retain? – Adam Fyles Apr 13 '11 at 17:31
  • It is information on what what messages should go into the queues and what to do with the messages when they reach the front of the queue. I think I am going with a database solution afterall – Shane Apr 15 '11 at 08:18
0

The queues are either defined in Active Directory or as text files (in the system32\msmq\storage\LQS folder), for public and private respectively.

In theory you may be able to add custom properties to the public queue object in AD. Similarly, you may be able to add text to the private queue text file (although it may get stripped out should the queue properties be changed).

John Breakwell
  • 4,667
  • 20
  • 25
  • I had a look into this (using private queues) and it seems solid, but I can't take the chance on some unusual system event refreshing queues. In a way this is exactly what I was looking for: At least now I know it is not possible for this scenario and I can move on. Thanks John – Shane Apr 15 '11 at 08:17