activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lalit Nagpal (JIRA)" <>
Subject [jira] Commented: (AMQCPP-64) Inconsistency in topic names when creating topics
Date Fri, 02 Feb 2007 09:35:02 GMT


Lalit Nagpal commented on AMQCPP-64:


It works .... great .... it works bcoz now message->getCMSReply() method accepts a ::cms::Destination
... that makes it easier now .... 

This change and the introduction of setter methods in the message class for different data
types like setInt() setFloat() setLong() etc are cool changes .... they help me do things
in a easier way now ....  :)

although I have to recode some parts due to these changes :(

Thank you for all the support .... kindly close the bug

Lalit Nagpal
CSA, SunGard

> Inconsistency in topic names when creating topics
> -------------------------------------------------
>                 Key: AMQCPP-64
>                 URL:
>             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, DestProbs.cpp, StompExceptionScreenshot.jpg
> 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 
> 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

> 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.

View raw message