Discussion:
Duplicated messages
(too old to reply)
Javier
2006-06-06 21:16:39 UTC
Permalink
Hi All,

I like to know how is that MQEveryplace can detect a duplicate message on
the Sync Queue.

Actually I have a program (C native API) that do the following:

On a first run:

a) Take a file from the file system and generate a new Message
a.1) Generate a confirmID
a.2) Generate a messageID
b) Puts a message on the Bridge Queue in a Gateway Queue ManagerRemote Sync
Queue. Using the Field MQ_DATA filled with the file contents (any contents
is the same)
The put operation use the ConfirmID and MessageID generated on a)

On a second run:

a) Take a file and generate a new Message (same file that in the first run)
a.1) Generate a confirmID
a.2) Generate a messageID
b) Set the Field MQE_MSG_RESEND to MQE_TRUE
c) Puts a message on the same Queue that first run

I already try:
a) Use the same ConfirmID on the two runs
b) Use the same MessageID
c) Use both MessageID and ConfirmID

But ever I obtain the same result: Duplicated messages. (note that I never
send the ConfirmPut !!!)

So the question is: what must i do in order to let MQeveryplace detect that
this is the SAME message ? is there any way ?

Using a Queue on the Gateway the ConfirmID mechanism work just great, but I
can`t understand how it works on a Bridge Queue...

Any help welcome. Thanks!
Javier
2006-06-06 22:01:10 UTC
Permalink
Hi again.

I've the same in problem in Java.. I've probed exactly the same scenary with
the same conditions.

The problem seems to be more general.
Post by Javier
Hi All,
I like to know how is that MQEveryplace can detect a duplicate message on
the Sync Queue.
a) Take a file from the file system and generate a new Message
a.1) Generate a confirmID
a.2) Generate a messageID
b) Puts a message on the Bridge Queue in a Gateway Queue ManagerRemote Sync
Queue. Using the Field MQ_DATA filled with the file contents (any contents
is the same)
The put operation use the ConfirmID and MessageID generated on a)
a) Take a file and generate a new Message (same file that in the first run)
a.1) Generate a confirmID
a.2) Generate a messageID
b) Set the Field MQE_MSG_RESEND to MQE_TRUE
c) Puts a message on the same Queue that first run
a) Use the same ConfirmID on the two runs
b) Use the same MessageID
c) Use both MessageID and ConfirmID
But ever I obtain the same result: Duplicated messages. (note that I never
send the ConfirmPut !!!)
So the question is: what must i do in order to let MQeveryplace detect that
this is the SAME message ? is there any way ?
Using a Queue on the Gateway the ConfirmID mechanism work just great, but I
can`t understand how it works on a Bridge Queue...
Any help welcome. Thanks!
Raja Sreenivasan
2006-06-08 06:10:12 UTC
Permalink
Hi Javier,

Let me explain my understanding on this.
1)You created a message from a file,
2)Set the message id and confirm id
3)Send to MQ Qmanager, through MQe Gateway(Bridge) QManager.

4)Created one more message from the same file
5)Set the the same message id and confirm id
6)Set MQe message resend to true
7)Send to MQ QManager through the same MQe Gateway QManager

Coming to the problem, the second message you send is a newly created
message.
Eventhough the contents, Confirm Id and Message Id are same, these two are
two different messages. If you want to try resending the same first message,
use the same message object and set the resend to true for the same and try
to resend the message using confirmPutMessage() method.


Regards
Raja
Post by Javier
Hi again.
I've the same in problem in Java.. I've probed exactly the same scenary with
the same conditions.
The problem seems to be more general.
Post by Javier
Hi All,
I like to know how is that MQEveryplace can detect a duplicate message on
the Sync Queue.
a) Take a file from the file system and generate a new Message
a.1) Generate a confirmID
a.2) Generate a messageID
b) Puts a message on the Bridge Queue in a Gateway Queue ManagerRemote
Sync
Post by Javier
Queue. Using the Field MQ_DATA filled with the file contents (any contents
is the same)
The put operation use the ConfirmID and MessageID generated on a)
a) Take a file and generate a new Message (same file that in the first
run)
Post by Javier
a.1) Generate a confirmID
a.2) Generate a messageID
b) Set the Field MQE_MSG_RESEND to MQE_TRUE
c) Puts a message on the same Queue that first run
a) Use the same ConfirmID on the two runs
b) Use the same MessageID
c) Use both MessageID and ConfirmID
But ever I obtain the same result: Duplicated messages. (note that I never
send the ConfirmPut !!!)
So the question is: what must i do in order to let MQeveryplace detect
that
Post by Javier
this is the SAME message ? is there any way ?
Using a Queue on the Gateway the ConfirmID mechanism work just great,
but
Post by Javier
I
Post by Javier
can`t understand how it works on a Bridge Queue...
Any help welcome. Thanks!
Javier
2006-06-08 15:24:53 UTC
Permalink
Hi Raja,

Exactly! this is my problem. I can`t do this because after i send the first
message it is possible that my device is restarted and obviously i lost all
my objects.

There is another way to use this but manually set in a meesgae an id (or
something) to tell the gateway that is the same message that i sent before?

Thanks
Javier
Post by Raja Sreenivasan
Hi Javier,
Let me explain my understanding on this.
1)You created a message from a file,
2)Set the message id and confirm id
3)Send to MQ Qmanager, through MQe Gateway(Bridge) QManager.
4)Created one more message from the same file
5)Set the the same message id and confirm id
6)Set MQe message resend to true
7)Send to MQ QManager through the same MQe Gateway QManager
Coming to the problem, the second message you send is a newly created
message.
Eventhough the contents, Confirm Id and Message Id are same, these two are
two different messages. If you want to try resending the same first message,
use the same message object and set the resend to true for the same and try
to resend the message using confirmPutMessage() method.
Regards
Raja
Post by Javier
Hi again.
I've the same in problem in Java.. I've probed exactly the same scenary
with
Post by Javier
the same conditions.
The problem seems to be more general.
Post by Javier
Hi All,
I like to know how is that MQEveryplace can detect a duplicate message
on
Post by Javier
Post by Javier
the Sync Queue.
a) Take a file from the file system and generate a new Message
a.1) Generate a confirmID
a.2) Generate a messageID
b) Puts a message on the Bridge Queue in a Gateway Queue ManagerRemote
Sync
Post by Javier
Queue. Using the Field MQ_DATA filled with the file contents (any
contents
Post by Javier
Post by Javier
is the same)
The put operation use the ConfirmID and MessageID generated on a)
a) Take a file and generate a new Message (same file that in the first
run)
Post by Javier
a.1) Generate a confirmID
a.2) Generate a messageID
b) Set the Field MQE_MSG_RESEND to MQE_TRUE
c) Puts a message on the same Queue that first run
a) Use the same ConfirmID on the two runs
b) Use the same MessageID
c) Use both MessageID and ConfirmID
But ever I obtain the same result: Duplicated messages. (note that I
never
Post by Javier
Post by Javier
send the ConfirmPut !!!)
So the question is: what must i do in order to let MQeveryplace detect
that
Post by Javier
this is the SAME message ? is there any way ?
Using a Queue on the Gateway the ConfirmID mechanism work just great,
but
Post by Javier
I
Post by Javier
can`t understand how it works on a Bridge Queue...
Any help welcome. Thanks!
Raja Sreenivasan
2006-06-12 09:47:09 UTC
Permalink
Hi Javier,

Confirm ID is used while using synchronous remote queues to
re-check if the message has been delivered properly, as the
synchronous messaging doesn't assure proper delivery of the
messages in case of connection failures.

To overcome this issues MQe supports asynchronous delivery of
messages, where in the messages flow and once and once only
delivery of message is assured. When connection failures or
QueueManager restart happens then the messages put in to the
asynchronous remote queue will be stored physically and after
restarting the queue manager or reestablishment of connection,
message flow will resume.

In your case, using asynchronous remote queues to send messages
can give proper solution.

For more information on usage of confirm id, and asynchronous
queues, please refer the MQe documentation and examples
provided with MQe.

Regards
Raja
Post by Javier
Hi All,
I like to know how is that MQEveryplace can detect a duplicate message on
the Sync Queue.
a) Take a file from the file system and generate a new Message
a.1) Generate a confirmID
a.2) Generate a messageID
b) Puts a message on the Bridge Queue in a Gateway Queue ManagerRemote Sync
Queue. Using the Field MQ_DATA filled with the file contents (any contents
is the same)
The put operation use the ConfirmID and MessageID generated on a)
a) Take a file and generate a new Message (same file that in the first run)
a.1) Generate a confirmID
a.2) Generate a messageID
b) Set the Field MQE_MSG_RESEND to MQE_TRUE
c) Puts a message on the same Queue that first run
a) Use the same ConfirmID on the two runs
b) Use the same MessageID
c) Use both MessageID and ConfirmID
But ever I obtain the same result: Duplicated messages. (note that I never
send the ConfirmPut !!!)
So the question is: what must i do in order to let MQeveryplace detect that
this is the SAME message ? is there any way ?
Using a Queue on the Gateway the ConfirmID mechanism work just great, but I
can`t understand how it works on a Bridge Queue...
Any help welcome. Thanks!
Loading...