You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Albert Strasheim <fu...@gmail.com> on 2006/12/05 10:54:24 UTC

Stomp issues

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

Re: Stomp issues

Posted by James Strachan <ja...@gmail.com>.
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 <fu...@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/