Reputation: 23
I am using IBM Websphere message queue (MQ SERIES).Through my code i am sending a message to the message queue and before retriving the meaage from the other end ,I am sending another message to the same message queue,Will the previous message in the message queue is overwritten by my new message??
Or it depends on the timestamp or someting else, Plesae help me out to slove this. Thanks in advance.
Upvotes: 0
Views: 233
Reputation: 15283
As the name says, Message Queue
, messages sent to a queue are appended and not overwritten and will reside in that queue until they are consumed by an application or expire if expiry time is set on messages. A sending application can set a expiry (aka Time to live) time, meaning how long a message can stay in a queue. If the message is not consumed before the time, the message expires and becomes unavailable for consumption.
Upvotes: 1
Reputation: 1
MQ's advantage is that no messages will be lost so the sending of the second message will not overwrite the first message. All the messages will sit on the queue until an application consumes them.
Upvotes: 0