Author |
Message
|
ydeonia |
Posted: Mon Oct 29, 2012 10:54 pm Post subject: How can be delete empty message automatically?? |
|
|
Acolyte
Joined: 29 Oct 2012 Posts: 74
|
Hi
We have strange situation like we are getting empty messages continuously in the queue. Right now we are manually deleting those after every 7 days.
I request to all MQ gurus to give me any idea to do it automatically .
I didnt get any thing on Google for this.
Thanks
YSD |
|
Back to top |
|
 |
zpat |
Posted: Tue Oct 30, 2012 12:16 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Did you really expect Google to know about your own application bugs?
Don't address the symptom of the problem - address the cause. |
|
Back to top |
|
 |
ydeonia |
Posted: Tue Oct 30, 2012 1:09 am Post subject: |
|
|
Acolyte
Joined: 29 Oct 2012 Posts: 74
|
zpat wrote: |
Did you really expect Google to know about your own application bugs?
Don't address the symptom of the problem - address the cause. |
Thanks ,Its like we have some application when it sending the messages to MQ , its sending the empty messages too with it. We cant avoid the empty messages.
Now those empty messages are getting into queue with other kind of messages too.
So the big challenge was to delete the messages which are empty . what I think to overcome this
either I defined some other queue for empty messages and clear them manually or to define the expiry .
Some where in the forum I read about the mqget destructively . But I didnt get the point .
Please clear me. |
|
Back to top |
|
 |
Mr Butcher |
Posted: Tue Oct 30, 2012 1:57 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
1. i go with zpat - address the cause
2. make your consuming application tolerate empty messages
3. write your own application to browse / get empty messages
4. use a channel exit (if messages come in via channel)
5. ?!?
if you dont know what a "mqget destructively " is, then maybe you should do some more reading to get mq knowledge or talk with experienced colleagues. Setting up an automated solution for this with little mq knowledge may end up in a lot of trouble .... (if you do the wrong things) _________________ Regards, Butcher |
|
Back to top |
|
 |
Vitor |
Posted: Tue Oct 30, 2012 4:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ydeonia wrote: |
Thanks ,Its like we have some application when it sending the messages to MQ , its sending the empty messages too with it. We cant avoid the empty messages. |
Why not? It's illegal to raise a defect against the sending application? The sending application team are holding your family hostage? They have embarrassing pictures of you?
ydeonia wrote: |
So the big challenge was to delete the messages which are empty |
Which your reading application could easily do
ydeonia wrote: |
. what I think to overcome this
either I defined some other queue for empty messages and clear them manually or to define the expiry . |
I'm not sure "think" is what you're doing. If you define some other queue for empty messages, how are you going to get the empty messages into it without changing either the sending or receiving application? If you're changing the applications, why not simply change them to fix the root problem and avoid the need for an extra queue? Likewise with expiry; either the sending application needs to set it, or the receiving application would need to bounce it.
ydeonia wrote: |
Some where in the forum I read about the mqget destructively . But I didnt get the point . |
The point is that the receiving application must be doing this already. The important point is you didn't get the point but are still determined to fix this yourself.
ydeonia wrote: |
Please clear me. |
I echo the comments of my associates (who have already suggested much of the above), especially the danger of just thrashing round trying to fix this without real understanding of WMQ or apparently any desire to fix the problem at source but plug it up yourself. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Oct 30, 2012 4:33 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Care to explain what an 'empty' message contains?
Is it just the message-descriptor (MQMD), but zero bytes of application data?
Or is it something else? _________________ 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 |
|
 |
mattfarney |
Posted: Fri Nov 02, 2012 2:46 pm Post subject: |
|
|
 Disciple
Joined: 17 Jan 2006 Posts: 167 Location: Ohio
|
As two possible causes:
1. Someone is writing message to MQ and treating the \n (or other platform specific line-feed) as a new message.
So, "send this message\n" becomes
"send this message"
"\n"
2. Someone is not checking for a null input when writing to MQ. So a no write generates a message with empty data field.
Just some suggestions.
-mf |
|
Back to top |
|
 |
gunjand |
Posted: Tue Nov 06, 2012 11:55 am Post subject: |
|
|
Novice
Joined: 21 May 2009 Posts: 23
|
Ideally contract with source application should mention them to avoid sending NULL messages. This will be the permanent and clean fix. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Nov 06, 2012 12:47 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
ydeonia wrote: |
We have strange situation like we are getting empty messages continuously in the queue. |
Empty message? There is no such technical term "empty message."
gunjand wrote: |
Ideally contract with source application should mention them to avoid sending NULL messages. This will be the permanent and clean fix. |
NULL messages? There is no such technical term "NULL message."
I asked the OP to explain what an empty message looks like. I'm guessing that it contains zero bytes of application payload.
An mq message may contain 0-100MB of application (user) data. Thus, by definition, a message with zero bytes of app data is not an invalid message - at least to mq.
If the receiving application cannot tolerate a message with zero bytes of app data, it should apply the usual business rules for editing input data, and discard (if appropriate) the message that is invalid for the application. _________________ 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 |
|
 |
|