ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Message consumer not browsing messages

Post new topic  Reply to topic
 Message consumer not browsing messages « View previous topic :: View next topic » 
Author Message
Rush124
PostPosted: Wed Jul 22, 2015 12:22 am    Post subject: Message consumer not browsing messages Reply with quote

Novice

Joined: 05 Aug 2014
Posts: 19

Hi,

I have implemented an asynchronous message consumption application.
Here I have used message consumer callback function which is registered for multiple queues. This function browses messages and then tells to another thread which deletes the message using different handlers (Hconn and Hobj).

Message delivery sequence for queues is set as FIFO.
But I encountered a scenario where messages with different priorities are put to a queue, message are not browsed.

As I know If Message delivery sequence is FIFO, callback function should function properly even for messages with different priorities.

What am I missing here?

Further more I would like to refer documentations on How asynchronous message consumption works. Is Triggering connected to asynchronous message consumption? (Queue's TRIGTYPE is set to FIRST in my application)

Any help would be appreciated.
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Wed Jul 22, 2015 12:50 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

To answer your last question first.....triggering has nothing to do with asynchronous consume.

What makes you think that message priority stops the async. consume working properly ? Can you give a few more details about what you are doing ? What language are you using for example ?

One of the most common mistakes that people do is that they do something they shouldn't inside the consumer function. For example, issue an MQGET wait or similar. How are you passing the processing to the 'other' thread ?

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
Rush124
PostPosted: Wed Jul 22, 2015 1:44 am    Post subject: Reply with quote

Novice

Joined: 05 Aug 2014
Posts: 19

Hi Paul,
Thanks for replying.

Quote:
What makes you think that message priority stops the async. consume working properly ? Can you give a few more details about what you are doing ? What language are you using for example ?


I m using c++.
If the message delivery sequence of a queue is set 'priority' and messages with different priorities are put to the queue, async. consumer will not browse all the messages.
(That is if there are messages with priorities respectively 0,1,0,
then 3rd message will not be browsed. This is because, After browsing a message with high priority,browse cursor will not point to new msgs with lower priorities. )
(I am using MQGMO_BROWSE_NEXT the GMO option )


Quote:
One of the most common mistakes that people do is that they do something they shouldn't inside the consumer function. For example, issue an MQGET wait or similar. How are you passing the processing to the 'other' thread ?

Here after browsing the message(from message consumer function), message information is passed to a different thread. This thread connects to queue manager and uses non-shared type handle. Then same queue will be opened with 'MQOO_OUTPUT' as open option.

I am not clear about how the callback works. Does it poll for depths of the queues that are registered in MQCB function?
Back to top
View user's profile Send private message
PaulClarke
PostPosted: Wed Jul 22, 2015 2:31 am    Post subject: Reply with quote

Grand Master

Joined: 17 Nov 2005
Posts: 1002
Location: New Zealand

Just think of an async. consume as an MQGET message loop which calls your function for each retrieved message.

So, in order to stop the message cursor 'problem' add the MQGMO_MARK_BROWSE_HANDLE/MQGMO_UNMARKED_BROWSE_MSG options to your MQGET options.

Cheers,
Paul.
_________________
Paul Clarke
MQGem Software
www.mqgem.com
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Wed Jul 22, 2015 6:25 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Rush124 wrote:

I m using c++.
If the message delivery sequence of a queue is set 'priority' and messages with different priorities are put to the queue, async. consumer will not browse all the messages.
(That is if there are messages with priorities respectively 0,1,0,
then 3rd message will not be browsed. This is because, After browsing a message with high priority,browse cursor will not point to new msgs with lower priorities. )
(I am using MQGMO_BROWSE_NEXT the GMO option )

That is most probably a problem of your own doing...
Do you reset msgid, correlid, priority etc... (basically your MQMD) between 2 messages ? What happens if you reset the priority field prior to the get. Do you then get the 3rd message?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Message consumer not browsing messages
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.