activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From severedcross <severedcr...@gmail.com>
Subject Messages Never Arrive At Broker
Date Mon, 24 Jan 2011 20:01:41 GMT

Hi all,

I'm using a Java producer to send messages to STOMP-based consumers
(primarily Flex/Flash, but maybe also JavaScript in the future). The STOMP
clients also produce some messages, and those arrive fine, and the Java
consumer is able to pick them up and react to them. However, when the Java
producer begins to send messages, no messages arrive in the queue. The
pending count never increases, and the STOMP consumers never get any
messages. Producer flow control is turned off, and the messages are
non-persistent (I don't need them to stick around—in fact, I want them to
expire after about 2.5 seconds).

My code looks like this:

Message m;

try {
    m = sess.createTextMessage(inputMessage);
} catch (JMSException e) {
    l.error("Error creating ActiveMQ message. Error message: ", e);
    return;
}

try {
    producer.send(m);
    l.info ("Message sent to broker.");
} catch (JMSException e) {
    l.error("Error sending ActiveMQ message. Error message: ", e);
    return;
}


l is a log4j Logger, and sess is a session obtained from an
ActiveMQConnectionFactory. The factory is set up as such:
ActiveMQConnectionFactory factory = new
ActiveMQConnectionFactory(brokerUrl), and async dispatch/sending is disabled
(though having it enabled didn't help either).

Is there any reason why my JMS producer wouldn't work, when STOMP works fine
for both producing and consuming?
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/Messages-Never-Arrive-At-Broker-tp3234831p3234831.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message