You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by dmc <dm...@yahoo.com> on 2013/07/27 12:46:41 UTC

creating a field to send with the topic id

hi,

from the c# example  given , and which works for me:
http://activemq.apache.org/nms/examples.html

how do i send a topic with lets say 1 extra field?
for example a stock ticker plus an extra field for "last price"

this would be a string array of 2 elements {"MSFT.N","50.00"} 
which i guess would be concatenated to make this a unique topic on the
broker : ticker+lastprice.

i couldnt find a method on the session object to support this.
 
ITextMessage request = session.CreateTextMessage("Hello World!");













--
View this message in context: http://activemq.2283324.n4.nabble.com/creating-a-field-to-send-with-the-topic-id-tp4669816.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: creating a field to send with the topic id

Posted by dmc <dm...@yahoo.com>.
thanks tim

being new to this stuff i was thinking that there was some sort of record
like an array associated with a given topic - bit like how you can view the
record field in the reuters real time terminal  

eg a stock ticker like APPL could have a last , open, close , isin fields

i guess what i should do is in my pub RTD function restrict the func to 3
params : ticker and fieldname and value
and then publish to topic + "~" + fieldname
and then the same on the subscribe side string












--
View this message in context: http://activemq.2283324.n4.nabble.com/creating-a-field-to-send-with-the-topic-id-tp4669816p4669881.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: creating a field to send with the topic id

Posted by Timothy Bish <ta...@gmail.com>.
On 07/27/2013 06:46 AM, dmc wrote:
> hi,
>
> from the c# example  given , and which works for me:
> http://activemq.apache.org/nms/examples.html
>
> how do i send a topic with lets say 1 extra field?
> for example a stock ticker plus an extra field for "last price"
>
> this would be a string array of 2 elements {"MSFT.N","50.00"}
> which i guess would be concatenated to make this a unique topic on the
> broker : ticker+lastprice.
>
> i couldnt find a method on the session object to support this.
>   
> ITextMessage request = session.CreateTextMessage("Hello World!");
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/creating-a-field-to-send-with-the-topic-id-tp4669816.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
Not entirely sure what you are trying to do.  If you want to have both 
symbol and price in the Message a good way to do so is to add them as 
message properties.  You wouldn't really want to create a new topic for 
each symbol / price update, instead use a single Topic and listen for 
updates there.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/