|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
|
|
Problems with export messages and save queues |
« View previous topic :: View next topic » |
Author |
Message
|
Achim |
Posted: Thu Feb 05, 2004 2:45 am Post subject: Problems with export messages and save queues |
|
|
Guest
|
Hi,
we use some queues for logging messages. We have two messages with the same header and different body. When we save the Queue or export Messages, always the first message is saved / exported.
Achim |
|
Back to top |
|
|
RogerLacroix |
Posted: Thu Feb 05, 2004 9:52 am Post subject: |
|
|
Jedi Knight
Joined: 15 May 2001 Posts: 3258 Location: London, ON Canada
|
Hi,
Can I get a little more information:
- What version of MQ Visual Edit are you using? (click Help -> About)
- What OS are you running on? (i.e. Windows 2000)
- What version of Java are you using? ? (click Help -> About)
There are 2 ways to save a message(s) in MQ Visual Edit: Export and Backup.
Export will write the message data to a file whereas Backup will write both the message data along with the MQMD.
To export 1 or more messages then do the following:- Select (highlight) 1 or more messages in the main display.
- Click Edit -> Export Message
- On the Export Message popup, input the path and file name (you can use the Browse button). Note: If you are exporting more than 1 message then the filename will be a template for 'Each message to a separate file' option.
- Now click the radio button for either 'Each message to a separate file' or 'All selected messages to the same file'. You probably want the default of 'Each message to a separate file'.
- Finally, click the Save button.
User choice #1
If you had C:\temp\message.txt as the filename, selected separate files radio button and you exported 2 messages then look in C:\temp for the following files:
- message_0001.txt
- message_0002.txt
User choice #2
If you had C:\temp\message.txt as the filename, selected same files radio button and you exported 2 messages then look in C:\temp for the following file (1 only):
- message.txt
The Backup feature in MQ Visual Edit is very is to use. Just do the following:- Select (highlight) 1 or more messages in the main display (You can use CTRL-A to select all messages).
- Click File -> Backup Queue
- In the Save popup, choose your path and filename. Note: A file extension of VEQ will be add automatically when the file is created.
- Click the Save button
Now if you called your file log then in the directory you selected, you will find a file called log.veq . This file will contain all messages selected plus the MQMD of each message selected.
Hope that helps.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
|
Achim |
Posted: Mon Feb 09, 2004 2:47 am Post subject: |
|
|
Guest
|
Hi,
we use Visual Edit 1.0.7C, WinNT SP6, Java 1.4.1.
We use MQ-Integrator, and our system logs incoming and outgoing messages in the same queue. The MQI assumes the header / MQMD. So we have two messages with the same MQMD and different body in the same queue.
When we export the message, Visual Edit always exports the first message.
When we backup the two messages, Visual Edit saves twice the first message in the backupfile.
Regards
Achim |
|
Back to top |
|
|
RogerLacroix |
Posted: Mon Feb 09, 2004 8:16 am Post subject: |
|
|
Jedi Knight
Joined: 15 May 2001 Posts: 3258 Location: London, ON Canada
|
Hi,
What do you mean by
Quote: |
The MQI assumes the header / MQMD. |
Do you mean that during the MQPUT, the queue manager creates a unique MsgID for the message?
But then you say
Quote: |
So we have two messages with the same MQMD and different body in the same queue. |
Yes, 2 messages can have the MQMD header except for the MsgID field. I (and IBM) strongly suggest that you never have 2 or more messages with the same MsgID value.
From the WebSphere MQ Application Programming Reference manual:
Quote: |
Generally, no two messages should have the same message identifier, although this is not disallowed by the queue manager. |
If you do have 2 or more messages with the same MsgID value then yes, MQ Visual Edit will probably act the way you have described.
May I ask what business reason / business case do you have for creating more than 1 message with the same MsgID value - given the fact that you could have used the CorrelID field?
I will log this as a user requested enhancement.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
|
RogerLacroix |
Posted: Mon Feb 09, 2004 12:07 pm Post subject: |
|
|
Jedi Knight
Joined: 15 May 2001 Posts: 3258 Location: London, ON Canada
|
Hi,
I have a fix for you.
In the very, very, very soon to be released v1.1.0 of MQ Visual Edit, you will be able to backup messages with the same MsgID value. To do this, first you MUST select all messages in the queue then select Backup Queue (File -> Backup Queue).
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
|
jefflowrey |
Posted: Mon Feb 09, 2004 12:21 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Just an FYI, I had a similar problem with QPasa failing when trying to pull messages with the same MsgId. I don't know if they've fixed it yet or not, as I changed jobs.
It's very convenient to do a Get by MsgId - but it may not be the right thing to do, especially when trying to dump an entire queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
|
RogerLacroix |
Posted: Mon Feb 09, 2004 12:40 pm Post subject: |
|
|
Jedi Knight
Joined: 15 May 2001 Posts: 3258 Location: London, ON Canada
|
Hi,
That's exactly what MQ Visual Edit was doing. If the user selected 5 messages out of 100 in the queue to be 'Backed Up' or 'Exported', I had it coded to use the MsgID to find the user's selected message in the queue. As soon as MQVE found it and the message was written (no checks if the message was previously written out). MQVE would then move to the next selected message.
Now if the user selects ALL messages, I have MQVE just dump every message in the queue rather than search for the selected message (no searching).
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
|
|
|
|
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|