You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sandeep Chayapathi <sa...@wssource.com> on 2006/08/22 22:50:27 UTC

Composite Destination and Stomp

Hi,
  I use the ruby Stomp client to send message to a composite 
destination, made of a queue and a topic. Here is the snippet of the code:
------------
require 'stomp'

client = Stomp::Connection.new("test","user","localhost","61613")


for i in 0..10
    sleep 1
    client.send "/queue/FOO.durable,/topic/FOO.test", "[Ruby] message " 
+ i.to_s
    puts "[Ruby] message " + i.to_s
end

client.disconnect
--------------

 Using JConsole, Im able to see that this creates two queues:
  . FOO.durable  &
  . /topic/FOO.test

 where as I had expected FOO.test to turn up under the topics. Im using 
ActiveMQ 4.0.2. What is the correct way to use durable destination under 
stomp ?

- Sandeep

Re: Composite Destination and Stomp

Posted by James Strachan <ja...@gmail.com>.
On 8/22/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
> Hi,
>   I use the ruby Stomp client to send message to a composite
> destination

FWIW you can now implement composite destinations purely on the broker
side (so that they are invisible to clients) if you prefer...

http://incubator.apache.org/activemq/virtual-destinations.html


>, made of a queue and a topic. Here is the snippet of the code:
> ------------
> require 'stomp'
>
> client = Stomp::Connection.new("test","user","localhost","61613")
>
>
> for i in 0..10
>     sleep 1
>     client.send "/queue/FOO.durable,/topic/FOO.test", "[Ruby] message "
> + i.to_s
>     puts "[Ruby] message " + i.to_s
> end
>
> client.disconnect
> --------------
>
>  Using JConsole, Im able to see that this creates two queues:
>   . FOO.durable  &
>   . /topic/FOO.test
>
>  where as I had expected FOO.test to turn up under the topics. Im using
> ActiveMQ 4.0.2. What is the correct way to use durable destination under
> stomp ?

For durable messages you need to set the persistent: true header
http://incubator.apache.org/activemq/stomp.html

-- 

James
-------
http://radio.weblogs.com/0112098/