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.

http://www.nabble.com/file/6111/DestProbs.cpp DestProbs.cpp 

If you execute this piece of code you will see the output as in the attached
image file

http://www.nabble.com/file/6110/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

-- 
View this message in context: 
http://www.nabble.com/activemq-cms-stomp---creating-a-topic-from-message-%3EgetCMSReplyTo%28%29-does-not-work-tf3142309.html#a8709154
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to