Any issue with browse option..
I'm trying to create an application in SunOS using C programing to browse a queue.
The issue was,
I have 4(multiple) processes, each will browse the same queue, but a message needs to be visible to a single process.
currently if i invoke 4 processes, all 4 read the same messages again and again.
I'm using the below option..
O_options = MQOO_BROWSE /* open queue for browse, */
+ MQOO_FAIL_IF_QUIESCING; /* but not if MQM stopping */
gmo.Version = MQGMO_VERSION_2; /* Avoid need to reset Message */
gmo.MatchOptions = MQMO_NONE; /* ID and Correlation ID after */
/* every MQGET */
gmo.WaitInterval = 10000;
gmo.Options = MQGMO_WAIT + MQGMO_BROWSE_FIRST + MQGMO_ACCEPT_TRUNCATED_MSG
gmo.Options = MQGMO_WAIT + MQGMO_BROWSE_NEXT + MQGMO_ACCEPT_TRUNCATED_MSG
Whats wrong in this...
Re: Any issue with browse option..
The lock on a MQGET browsed message is released as soon as that thread issues another MQGET, hence that message becomes available to be MQGET browsed by another thread.
If that does not suit your design, look at the cooperative browsing feature of MQ v7.0. Its all in the WMQ App Programming Ref V7.0 and WMQ App Programming Guide V7.0.