Testing MSMQ Applications

Wednesday, March 14, 2012 8:31:07 PM

How do you send messages to a database using the Microsoft Message Queue?

1 Replies
Wednesday, March 14, 2012 8:31:16 PM
Avatar
re: inflectra.adam on Wednesday, March 14, 2012 8:31:07 PM
var qi = new ActiveXObject ("MSMQ.MSMQQueueInfo");
qi.pathname = ".\\private$\\testqueue";

var MQ_SEND_ACCESS = 2;
var MQ_DENY_NONE = 0;

var q;
q = qi.Open (MQ_SEND_ACCESS, MQ_DENY_NONE);

var msg = new ActiveXObject ("MSMQ.MSMQMessage");

msg.body = "Hello World";
msg.label = "Hello World label";

msg.Send (q);
Statistics
  • Started: Wednesday, March 14, 2012 8:31:07 PM
  • Last Reply: Wednesday, March 14, 2012 8:31:16 PM
  • Replies: 1
  • Views: 8600