Author |
Message
|
sebastien.huber |
Posted: Thu Oct 19, 2006 4:31 am Post subject: Is it possible to secure MQGET ? |
|
|
Newbie
Joined: 19 Oct 2006 Posts: 3
|
Hello all,
I'm currently writing a windows DLL with MQ Series functions to be able :
1. to read a message from a queue
2. to store it in a file
3. to delete the message from the queue
(in case of the application failure, we do not loose any information with this method)
I see two possibilities :
-> to prevent MQGET to delete the message we are reading (it means with open option MQOO_INPUT_AS_Q_DEF). (in amqsget0.c)
or
-> to allow MQGET to read the whole message, without truncating it when calling function amqsgbr0.c
output example of amqsgbr0.c :
Code: |
5 < PLUSBQFI00032006-10-06#12:16:191000173 >
--- truncated
6 < PLUSBQFI00032006-10-06#12:17:091000182 >
--- truncated
7 < PLUSBQFI00032006-10-06#12:23:381000165 >
--- truncated |
each message is ~1024 bytes long, only got a few one from the beginning
Any idea ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 19, 2006 4:37 am Post subject: Re: Is it possible to secure MQGET ? |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
sebastien.huber wrote: |
I see two possibilities :
-> to prevent MQGET to delete the message we are reading (it means with open option MQOO_INPUT_AS_Q_DEF). (in amqsget0.c) |
That is not what that MQOO means.
sebastien.huber wrote: |
or
-> to allow MQGET to read the whole message, without truncating it when calling function amqsgbr0.c |
That is not what "truncate" means. Nor is it what amqsgbr does. It browses the queue.
You want to read this, several times.
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzal.doc/usesync.htm
And then go back and read the rest of the Application Programming Guide, and probably the MQ Primer.
Or get some training. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Thu Oct 19, 2006 4:45 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
What has what you want got to do with the title of the thread?
To answer the title (in case that is what you wanted to know)....yes you can secure MQGET but you do it by securing the actual input Queue.
Actually there is a thrid otpion too.
Write a pretty simple and fairly basic program to actually do your desired 3 steps without needing to use utilities that don't actually do what you want anyway.  |
|
Back to top |
|
 |
sebastien.huber |
Posted: Thu Oct 19, 2006 4:49 am Post subject: Re: Is it possible to secure MQGET ? |
|
|
Newbie
Joined: 19 Oct 2006 Posts: 3
|
jefflowrey wrote: |
sebastien.huber wrote: |
I see two possibilities :
-> to prevent MQGET to delete the message we are reading (it means with open option MQOO_INPUT_AS_Q_DEF). (in amqsget0.c) |
That is not what that MQOO means. |
so, what does it means ? which option should i set not to have the message deleted ?
jefflowrey wrote: |
sebastien.huber wrote: |
or
-> to allow MQGET to read the whole message, without truncating it when calling function amqsgbr0.c |
That is not what "truncate" means. Nor is it what amqsgbr does. It browses the queue. |
That's what I'm loogin for, beeing able to read messages without removing them from the queue. Any idea on the <<correct>> function to use, better than amqsgbr ?
I have already read AP guide, and didn't find relevant informations that's why I'm asking this question here |
|
Back to top |
|
 |
sebastien.huber |
Posted: Thu Oct 19, 2006 4:52 am Post subject: |
|
|
Newbie
Joined: 19 Oct 2006 Posts: 3
|
kevinf2349 wrote: |
What has what you want got to do with the title of the thread? |
i want to secure the process explained at the top
kevinf2349 wrote: |
To answer the title (in case that is what you wanted to know)....yes you can secure MQGET but you do it by securing the actual input Queue. |
I'd like to be sure, that if I get a message from the queue and at that moment, my application fail, the message cannot be lost
kevinf2349 wrote: |
Actually there is a thrid otpion too.
Write a pretty simple and fairly basic program to actually do your desired 3 steps without needing to use utilities that don't actually do what you want anyway.  |
can you give me more informations about that ? I'm pretty new in the MQSeries world |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 19, 2006 5:17 am Post subject: Re: Is it possible to secure MQGET ? |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
sebastien.huber wrote: |
I have already read AP guide, and didn't find relevant informations that's why I'm asking this question here |
I pointed you directly at relevant information.
You want to use Syncpoint.
You don't want to use browse. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|