activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Strasheim" <>
Subject Stomp issues
Date Tue, 05 Dec 2006 09:54:24 GMT
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) {
        final String brokerURL = "tcp://localhost:61616";
        final ConnectionFactory connectionFactory =
            new ActiveMQConnectionFactory(brokerURL);
        final Connection connection = connectionFactory.createConnection();
        final Session session = connection.createSession(false,
        final Destination destination = new ActiveMQTopic("foo");
        final MessageProducer producer = session.createProducer(destination);
        final MessageConsumer consumer = session.createConsumer(destination);
        consumer.setMessageListener(new FooListener());

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.



View raw message