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 » IBM MQ API Support » iMessageConsumer - how does one reply to the message

Post new topic  Reply to topic Goto page Previous  1, 2
 iMessageConsumer - how does one reply to the message « View previous topic :: View next topic » 
Author Message
fjb_saper
PostPosted: Fri Aug 21, 2009 2:01 pm    Post subject: Reply with quote

Grand High Poobah

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

As to the solution... I am not so familar with the .NET XMS package but I am surprised by this part of your code:

JeffTheDotNetGuy wrote:
Code:
          If oTopic Is Nothing Then
                oTopic = oFactory.CreateQueue("TestQueue")
            End If

I would have expected your oTopic to be of type Destination and not use a "Topic" name for what is essentially a "Queue".
I know semantics, but it helps clarifying for newbies...

So again
Destination is the generic type object. Valid instances objects for the Destination are Queue and Topic. Note that Queue and Topic will behave somewhat differently but most of the methods will take the Destination object, so Queue and Topic may for all purposes appear as interchangeable.

Once you look into pub/sub you realize that they are not (interchangeable that is).

Have fun.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
shashikanth_in
PostPosted: Sun Aug 23, 2009 6:03 am    Post subject: Reply with quote

Centurion

Joined: 26 Feb 2009
Posts: 123

Hmmm. Saw this post very late. Yes, XMS internally creates a temporary queue on which response is recieved in a reques/response type of messaging. Please note that the scope of the temporary queue is connection and hence can't be used accross different connections.
Back to top
View user's profile Send private message
JeffTheDotNetGuy
PostPosted: Mon Aug 24, 2009 2:50 am    Post subject: Reply with quote

Novice

Joined: 21 Aug 2009
Posts: 10

Yes, sir. Originally my intention was to code to a topic, but wound up going with a queue and never updated my code. Sorry new folks. Those objects you see at the top of my function there are all thread-safe, so I am holding a single instance of each globally for reference by every thread in the service. (I should have posted those global definitions):

Code:

    Public oFactory As IBM.XMS.XMSFactoryFactory
    Public oConnectionFactory As IBM.XMS.IConnectionFactory
    Public oConnection As IBM.XMS.IConnection
    Public oTopic As IBM.XMS.IDestination




And yes... that temporary queue is easily accessed by referencing the message's ReplyTo object. The shared connection instance avoids any problems.

Code:

Dim oReplier As IBM.XMS.IMessageProducer = oSession.CreateProducer(oCurrMessage.JMSReplyTo)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ API Support » iMessageConsumer - how does one reply to the message
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.