ibm-messaging / mq-golang

Calling IBM MQ from Go applications
Apache License 2.0
168 stars 60 forks source link

Messages Missing #176

Closed 2020testuser closed 3 years ago

2020testuser commented 3 years ago

Hi, Could anyone please help me? In my queue, there are 100 messages. My go program reads all messages in the queue. I see there are no messages in the queue when I run my go program. However, my go program only reads 80 messages. If in AppWatch tool, I see the queue's depth as 'zero', how I only see 80 messages in my go program's log.

Below are the settings I'm using in my go program. ibmmq.MQGMO_SYNCPOINT ibmmq.MQGMO_ACCEPT_TRUNCATED_MSG

WaitInterval set to 200 milliseconds.

Is there a way to make my queue manager sleep so it can get all messages? Or is there a better way to check whether all the 100 messages must be processed using the ibmmq option settings?

If you have any information, please share.

Thanks in advance.

ibmmqmet commented 3 years ago

If the messages are already on the queue, and have been committed, and do not have an expiry set, then the retrieving app will be able to get all of them. If you are setting the WaitInterval to delay until more messages have been sent, then you also need to set MQGMO_WAIT

2020testuser commented 3 years ago

@ibmmqmet - Thanks! Yes, I'm setting the MQGMO_WAIT. Finally, figured out when found that another app. was consuming the messages as well. Will close this issue.