Author |
Message
|
ooberoi |
Posted: Tue Jan 08, 2013 11:50 am Post subject: Need to implement a .Net Listener |
|
|
Newbie
Joined: 02 Jan 2013 Posts: 3
|
I have successfully tested a utility that writes and reads a message to the queue in .Net using Webshpere MQ.
What I would like to do now is to automate the process such that it automatically listens for a message that appears on the queue.
Could someone send me a sample code how this can be done?
Thank You,
Obi |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 08, 2013 12:01 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jan 08, 2013 12:12 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
That's a terrible URL to point at.
There's no reason to use a trigger monitor.
Google will surely help ooberoi find the very recent message thread that also discussed .NET and trigger monitors. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 08, 2013 12:17 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jan 08, 2013 12:30 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
lancelotlinc wrote: |
He doesn't say what version of MQ he's using. I don't know how terrible it could be. |
And yet if it was mentioned that he or she was using v6.0, you would be the first person to say that he or she needed to migrate to a supported version. |
|
Back to top |
|
 |
ooberoi |
Posted: Tue Jan 08, 2013 12:33 pm Post subject: |
|
|
Newbie
Joined: 02 Jan 2013 Posts: 3
|
Sorry, the WebSphere MQ version is 7.0.1.
You are right, Google is my friend too , but I couldn't find the solution I am looking for. There was a thread or two, but with incomplete solutions.
As a last resort, I came to this forum. I hope I won't be dissapointed.!
Cheers,
Ob |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Jan 08, 2013 12:44 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
ooberoi wrote: |
I hope I won't be dissapointed.!
|
No, you won't regret it. Tuesdays are bickering days. Try us on any other day of the week.
No they're not. Yes, they are. No, they're not. (repeat) _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Last edited by bruce2359 on Tue Jan 08, 2013 12:44 pm; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jan 08, 2013 12:44 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ooberoi wrote: |
As a last resort, I came to this forum. I hope I won't be dissapointed.! |
Google should have found you the thread in here my most worthy associate is talking about, as well as a lot of other relevant material. You'll find a custom Google search box top right of this page for your convenience. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mvic |
Posted: Tue Jan 08, 2013 12:46 pm Post subject: Re: Need to implement a .Net Listener |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
ooberoi wrote: |
What I would like to do now is to automate the process such that it automatically listens for a message that appears on the queue.
Could someone send me a sample code how this can be done? |
There is a sample that gets a message. "Getting a message" can also be expressed as "listening" for a message. Look under MQINST\tools\dotnet\samples\cs for nmqsget.cs Is that what you were looking for? |
|
Back to top |
|
 |
ooberoi |
Posted: Tue Jan 08, 2013 3:55 pm Post subject: |
|
|
Newbie
Joined: 02 Jan 2013 Posts: 3
|
Thanks mvic.
The example is certainly good. I am thinking of creating a console app which can call this utility (the one you mentioned) and run it until something breaksdown. We can decide either to send an email, log the message and/or keep running using a windows scheduler. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jan 09, 2013 4:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
ooberoi wrote: |
Thanks mvic.
The example is certainly good. I am thinking of creating a console app which can call this utility (the one you mentioned) and run it until something breaksdown. We can decide either to send an email, log the message and/or keep running using a windows scheduler. |
It's a normal idea.
But it's not a good one.
You should modify the sample to do what you actually need to do, instead.
Becuase the sample only does very small things, and is by no means intended to be used in production manner. |
|
Back to top |
|
 |
|