/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] How to check if the private queue is empty or not? (MSMQ using JavaScript)

Hi,

I have got the below code to retrieve the message from MSMQ using JavaScript. It retrieves the message from MSMQ if there is a messages in the queue. Browser it hangs, it tries to retrieve the message but there is no message in the queue.

if anyone knows the JavaScript code to check if the private queue is empty or not, Please share it to me.

I look forward to your reply.

Thanks in Advance.
Kiruba

var qi = new ActiveXObject (“MSMQ.MSMQQueueInfo”);
qi.pathname = “.private$myqueue”;

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);

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KirubanandamauthorApr 23.2013 — The below link provides the solution for this problem. It has the function to checks whether the private MSMQ is empty or not.

http://stackoverflow.com/questions/3440897/peeking-an-msmq-outgoing-queue-with-jscript
×

Success!

Help @Kirubanandam spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...