Author |
Message
|
vijayvm21 |
Posted: Tue Sep 23, 2014 1:08 am Post subject: how would i know some one is putting messing in my queue |
|
|
Novice
Joined: 23 Sep 2014 Posts: 12
|
i need to know that who will put message in my queue and also how many message are in my queue, |
|
Back to top |
|
 |
hughson |
Posted: Tue Sep 23, 2014 2:31 am Post subject: Re: how would i know some one is putting messing in my queue |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
vijayvm21 wrote: |
i need to know that who will put message in my queue and also how many message are in my queue, |
There are many answers to this question, since this question is not very specific. You may wish to ask a clarifying question once you read my answer.
You know who is going to be able to put a message to your queue, because you know who you allowed to connect to your queue manager and you know who you allowed to open your queue for access to put messages. If you have not secured your queue manager then you cannot know who will put messages to your queue because the answer could be anyone!
You know who is currently putting messages to your queue by issuing commands such as:-
Code: |
DISPLAY CONN(*) TYPE(ALL) WHERE(OBJNAME EQ q-name) |
or
Code: |
DISPLAY QSTATUS(q-name) TYPE(HANDLE) ALL |
You know has been putting messages to your queue in the past if you have accounting and statistics turned on. You can read more about that in "Accounting and statistics messages".
You can display how many messages are currently on your queue by issuing the following command:-
Code: |
DISPLAY QLOCAL(q-name) CURDEPTH |
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
vijayvm21 |
Posted: Tue Sep 23, 2014 2:40 am Post subject: how would i know that some one is putting new message in my |
|
|
Novice
Joined: 23 Sep 2014 Posts: 12
|
how would i know that some one is putting new message in my queue using .net code |
|
Back to top |
|
 |
vijayvm21 |
Posted: Tue Sep 23, 2014 3:23 am Post subject: How to receive notification when IBM Queue receive any msg |
|
|
Novice
Joined: 23 Sep 2014 Posts: 12
|
i want to create an application that liten a queue continuously monitor that queue. now my question is How to receive notification when IBM Queue receive a new message to that queue in myapplication. i am using c# code for that |
|
Back to top |
|
 |
hughson |
Posted: Tue Sep 23, 2014 3:26 am Post subject: Re: How to receive notification when IBM Queue receive any m |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
So you want to wait on the queue and when a message arrives on the queue you want your application to get that message off the queue? Is that what you are asking?
Also, do you want your application to be automatically started when such a message arrives, or do you want your application to be running already and just waiting on the queue for messages?
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
exerk |
Posted: Tue Sep 23, 2014 3:27 am Post subject: Re: how would i know that some one is putting new message in |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
vijayvm21 wrote: |
how would i know that some one is putting new message in my queue using .net code |
Why would you want to know?
vijayvm21 wrote: |
i want to create an application that liten a queue continuously monitor that queue. now my question is How to receive notification when IBM Queue receive a new message to that queue in myapplication. i am using c# code for that |
It's called GET WITH WAIT, but do please make sure you code FAIL_IF_QUIESCING if you make that wait indefinite...
...or triggering, as the most illustrious maiden has alluded to. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Sep 23, 2014 4:39 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
You would know who (what application, what userid, what date/time, etc.) by examining the message descriptor header (MQMD) that is part of each message put to the queue. _________________ 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. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 23, 2014 5:04 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
vijayvm21 |
Posted: Tue Sep 23, 2014 5:26 am Post subject: how would i know that some one is putting new message in my |
|
|
Novice
Joined: 23 Sep 2014 Posts: 12
|
I need to write a Web Application in C# to listen the request queue configured in WebSphere MQ 7.5. Whenever a new message arrives in the queue, the service should pick the message and process the request.
I want to know the best practices of implementing the Listener Service in C#. |
|
Back to top |
|
 |
hughson |
Posted: Tue Sep 23, 2014 5:35 am Post subject: Re: how would i know that some one is putting new message in |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
|
Back to top |
|
 |
vijayvm21 |
Posted: Tue Sep 23, 2014 6:44 am Post subject: |
|
|
Novice
Joined: 23 Sep 2014 Posts: 12
|
ya but in my queue the other person put a message . so i need to know in he puts a message in that queue on that time i got a message that some one put message . |
|
Back to top |
|
 |
exerk |
Posted: Tue Sep 23, 2014 6:47 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
vijayvm21 wrote: |
ya but in my queue the other person put a message . so i need to know in he puts a message in that queue on that time i got a message that some one put message . |
Why? Why do you need to know? Is it an audit requirement that you transaction monitor your queues? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
vijayvm21 |
Posted: Tue Sep 23, 2014 6:51 am Post subject: |
|
|
Novice
Joined: 23 Sep 2014 Posts: 12
|
exerk wrote: |
vijayvm21 wrote: |
ya but in my queue the other person put a message . so i need to know in he puts a message in that queue on that time i got a message that some one put message . |
Why? Why do you need to know? Is it an audit requirement that you transaction monitor your queues? |
i am creating a app that some one put message in my queue that on that time i read that message and after processing that message i send to that message to another queue. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Sep 23, 2014 6:55 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
vijayvm21 wrote: |
exerk wrote: |
vijayvm21 wrote: |
ya but in my queue the other person put a message . so i need to know in he puts a message in that queue on that time i got a message that some one put message . |
Why? Why do you need to know? Is it an audit requirement that you transaction monitor your queues? |
i am creating a app that some one put message in my queue that on that time i read that message and after processing that message i send to that message to another queue. |
Yes, so you need to write an app that - reads a message from a queue
- builds a reply message
- sends the reply
.
Both the link I posted and the link Morag posted will tell you how to do that.
Have you considered reading them? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 23, 2014 6:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
vijayvm21 wrote: |
ya but in my queue the other person put a message . so i need to know in he puts a message in that queue on that time i got a message that some one put message . |
There are 2 use cases here, based on your slightly fractured English:
- you need to know that the other person has put a message on your queue because your application needs to process it. In this case you've been given 2 possible application solutions, and given your reference to a Listener Service I suspect this is your use case. So follow the advice given.
- you need to know the time the other person put the message because you're trying to record that. If so, why? What use will this information be put to?
Repeatedly asking the same question will not help; you need to expand and explain if we're going to help further. The fractured English is not an issue (in addition to English I speak both Scouce and Scottish) but the lack of additional information is. If the provided advice does not answer your question, why doesn't it? What's missing?
(And please, as a favour to me, avoid "ya". "Yes" is only one more letter and you sound less like my autistic neiphew trying to think of a reason he shouldn't do something. Thank you) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|