Cannot reinsert data with qtool from backup sds file: hub. Error: "Malformed messsage discarded"

Document ID : KB000113622
Last Modified Date : 12/09/2018
Show Technical Document Details
I'm trying to reinsert a backup sds queue file using qtool to a hub.
I'm using the qtool priveded in KB000010776

i.e   qtool -f nameofqueuefile.sds -s -a -x -p -d 1

The data is not inserted and in the hub.log I'm getting:

Aug 30 12:13:12:700 [2872] hub: Malformed messsage discarded
Aug 30 12:13:12:701 [2900] hub: Recurring message JF83533678-37594 dropped
Aug 30 12:13:12:701 [2900] hub: Malformed messsage discarded
Aug 30 12:13:12:701 [2864] hub: Recurring message JF83533678-37596 dropped
The error may be related to the fact that the file is too large to be inserted.
Attached to this article is the "qtool_script.txt"
This script should allow the files to be reinserted in smaller chunks.

@echo off

cd "\Program Files (x86)\Nimsoft\hub\q"

qtool -f test.sds -s | find "count:" > DoCntLog.txt

for /f "tokens=2" %%G IN ("%VALUE_FROM_FILE%") DO echo %%G >cnt2.txt
SET /P var_Cnt= < cnt2.txt
echo Line Count: %var_Cnt%

for /l %%x in (1, 10000, %var_Cnt%) do (
echo %%x
qtool -f test.sds -R 10000 -p -x
qtool -f test.sds -R 10000 -p -x

qtool -f test.sds -t test2.sds


•  Rename the script to .bat and edit the .sds file names that you find in the script to match what your large filename (nameofqueuefile.sds)
•  For understanding what the script is doing refer to the Help doc.
Additional Information:
Q: Why is the line "qtool -f test.sds -R 10000 -p -x" repeated?
A: The first line is an echo which does displays on screen "echo %%x qtool -f test.sds -R 10000 -p -x" the second one does the work

Q: What is "test.sds2" in the script?
A: There will not be an exact number match when processing 10000 at a time. When there are left overs (data exceeding) the remaining are put into a test2 file that would need to be processed after. See the qtool documentation for the -t command -t<F> store unread messages in queue to file <F>

Related KB:
How to use qtool to re-insert data from a backed-up queue
File Attachments: