[ https://issues.apache.org/activemq/browse/AMQCPP-64?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Mittler resolved AMQCPP-64. ---------------------------------- Resolution: Won't Fix Looking closer at you sample code, it looks like the problem is how you're setting the CMSReplyTo. The following line is incorrect: message->setCMSReplyTo(replyTopic->toProviderString()); it should be: message->setCMSReplyTo(replyTopic->toString()); I'm going to resolve this issue for now - if you still find problems with replyTo, we can always open this back up. > Inconsistency in topic names when creating topics > ------------------------------------------------- > > Key: AMQCPP-64 > URL: https://issues.apache.org/activemq/browse/AMQCPP-64 > Project: ActiveMQ C++ Client > Issue Type: Bug > Components: CMS Impl, Stomp > Affects Versions: 1.0 > Environment: win / lin > Reporter: Lalit Nagpal > Assigned To: Nathan Mittler > Fix For: 2.0 > > Attachments: DestinationProblem.JPG, DestProbs.cpp > > > Hi > I am using the activemq-cpp cms api 1.0 release. The problem I am facing is > like this- > My producer sends a message to the consumer and a message should be sent from > the receiving end as a reply after this - consider a situation where a > loginRequest message has been sent and now a loginReply message should be > sent from the receiving end. > Attached is a sample main that can reproduce the problem I am facing - I have > modified the sample helloproducer helloconsumer code available at > http://activemq.org/site/activemq-cpp-client.html > to reproduce my problem so that its easier for you to see. Please see > attached cpp file = DestProbs.cpp. > If you execute this piece of code you will see the output as in the attached > image file (see attachments = DestinationProblem.JPG) > This is what the code does > producer lets call it xxx sends a "Hello world! from thread xxxx" to the > consumer > consumer lets call it yyy receives the message and displays it > this is the normal behavior as given in the example on > http://activemq.org/site/activemq-cpp-client.html > Following extra needs to be done now > from yyy a reply should go back to xxx ... for this i registered a producer > at yyy by creating a topic using the message->getCMSReplyTo() and then > replying back to that destination. > The mismatch can be easily see by doing a bstat .... when I created the > consumer yyy initially it created a topic by name say ABCDEFGH (which is a > random id) and later on when I used the message->getCMSReplyTo() to create a > topic the topic was registered with the name /topic/ABCDEFGH ..... the > additional /topic/ that has got added is doing a mess up here and the replies > from yyy to xxx are not reaching xxx (getting enqueued and not dequeued) ... > the /topic/ gets added due to the following statement in HelloWorldProducer - > run method > message->setCMSReplyTo(replyTopic->toProviderString()); > here the toProviderString method adds it actually ... if you replace this > method with just the toString() method ... you will get a stomp exception > saying that destinations should start with either /topic/ or /queue/ > Can somebody make this code work please. > For every message sent by the producer to consumer "Hello world! from thread > xxxx" there should be a reply coming back as "Thank you for Hello World !!!" > Please help me urgently here. > Thank you in advance > Lalit Nagpal > CSA, SunGard -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.