activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Stomp issues
Date Tue, 05 Dec 2006 10:08:19 GMT
Java doesn't implement Stomp on the client yet (just on the broker
side). If you want to test out Stomp use C++ or Ruby or something

On 12/5/06, Albert Strasheim <fullung@gmail.com> wrote:
> Hello all
>
> I'm using ActiveMQ and ActiveMQ-CPP to integrate a bunch of Java and
> C++ applications.
>
> While the OpenWire C++ implementation is being sorted out, we're
> trying to use ActiveMQ-CPP with STOMP. When publishing to a topic from
> C++ over STOMP (without any consumers subscribed) we're seeing
> excessive CPU usage on the broker. We're still trying to investigate
> this issue.
>
> In an attempt to reproduce it, I tried to run the following test:
>
> public final class StompTest {
>     public static void main(final String args[]) throws JMSException,
> InterruptedException {
>         final class FooListener implements MessageListener {
>             public void onMessage(final Message message) {
>                 System.out.println(message);
>             }
>         }
>         final String brokerURL = "tcp://localhost:61616";
>         final ConnectionFactory connectionFactory =
>             new ActiveMQConnectionFactory(brokerURL);
>         final Connection connection = connectionFactory.createConnection();
>         final Session session = connection.createSession(false,
> Session.AUTO_ACKNOWLEDGE);
>         final Destination destination = new ActiveMQTopic("foo");
>         final MessageProducer producer = session.createProducer(destination);
>         final MessageConsumer consumer = session.createConsumer(destination);
>         consumer.setMessageListener(new FooListener());
>         connection.start();
>         producer.send(session.createMessage());
>         Thread.sleep(10000);
>         connection.close();
>     }
> }
>
> I receive the message without problems. Changing the broker URL to
> stomp://localhost:61613 and running again seems to cause the program
> to hang when calling createSession on the connection.
>
> I've seeing this behaviour with ActiveMQ 4.0.2 and the latest from trunk.
>
> Can anybody else reproduce this? Any help would be appreciated.
>
> Regards,
>
> Albert
>


-- 

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

Mime
View raw message