Author |
Message
|
MQGuy2000 |
Posted: Wed Oct 22, 2003 7:19 am Post subject: Is Message COnsumed |
|
|
Centurion
Joined: 20 Jul 2003 Posts: 131
|
Can anyone help
My application is trying to GET messages froma queue. But once it GETS the message , the application is throwing "Malformed Message: Exception.".
In this case is the message consumed?
I ask this question as the messages are still inside the queue.
MQGuy |
|
Back to top |
|
 |
vennela |
Posted: Wed Oct 22, 2003 7:58 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Are you doing a GET under syncpoint? If it is doing a GET under syncpoint then the message will not be lost, but otherwise it will be lost. The exception that you are getting, is it an MQ exception or is it an application exception? |
|
Back to top |
|
 |
MQGuy2000 |
Posted: Wed Oct 22, 2003 8:06 am Post subject: |
|
|
Centurion
Joined: 20 Jul 2003 Posts: 131
|
Can you tell me what is doing GET at syncpoint?Please.
We get MQException.
-Exception: com.ibm.jms.JMSBytesMessage- |
|
Back to top |
|
 |
vennela |
Posted: Wed Oct 22, 2003 8:45 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
I am compiling various replies to similar questions in this forum to answer your question.
In the GetMessageOptions you need to specify that you are getting under syncpoint.
Example
Code: |
MQGetMessageOptions gmo = new MQGetMessageOptions() ;
gmo.options = MQC.MQGMO_ACCEPT_TRUNCATED_MSG | MQC.MQGMO_SYNCPOINT |
How your application should look like
http://www.mqseries.net/phpBB2/viewtopic.php?t=4715&start=0
Quote: |
Here is the senerio.
I have 20 Persistance messages in my INPUT queue.
Everytime I need to process only 10 messages.
I have used Syncpoint option in my MQGET call.
MQCONN
MQOPEN
---------------------------------UOW Start-----------
Loop till msg count = 10
MQGET with Syncpoint ....
Bussiness logic
Loop-End
--------------------------------- UOW end-----------
If Syncpoint
MQCMIT
Else
MQBACK
End-if.
MQCLSOE
MQDISC |
|
|
Back to top |
|
 |
MQGuy2000 |
Posted: Wed Oct 22, 2003 10:15 am Post subject: Is Message COnsumed - SYNCPOINT |
|
|
Centurion
Joined: 20 Jul 2003 Posts: 131
|
Thanks for all your replies.
Please tell me if I understand right.
-If an apploication GETS messages from a queue IN A SYNCPOINT then if the application fails due to some reason(example malformed message) then all the messages are put back in the queue.
- For NOT IN A SYNCPOINT, if teh application faile due to malformed message then the processed message is not put back in the queue.
Is my understanding correct?
2) How do we set syncpoint for a JMS application. |
|
Back to top |
|
 |
|