qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oggie <gog...@gmail.com>
Subject Re: java broker with jms and point to point
Date Thu, 27 Sep 2012 13:28:22 GMT
Thanks Robbie, I appreciate it.  The address change was the problem. I used
'amq.direct/shiftqueue' and it worked.

I'll look into making the changes to JNDI at some point in the future. 

I now have data going into the correct queue without a consumer connected.

But once I connect my consumer, it creates the temp queues instead of
connecting to the shiftqueue.  Not sure why it's behaving that way either... 

It's a message listener:

public final class CPEMessageListener implements MessageListener {
    public void onMessage(final Message message) {
        try {
            BytesMessage bytesMessage = (BytesMessage) message;
            byte[] data = new byte[(int) bytesMessage.getBodyLength()];
            logger.debug("Consumed message: " + data.toString());
        } catch (JMSException e) {
            //TODO - we need to handle the error and determine if we should
exit or keep running.

My spring config:

    <bean id="connectionFactory"
        <constructor-arg index="0"

    <bean id="messageListener" class="com.blah.CPEMessageListener">

    <jms:listener-container concurrency="5-10" acknowledge="client">
        <jms:listener destination="amq.direct/shiftqueue"

    <bean id="cachedConnectionFactory"
          p:sessionCacheSize="1" />

    <bean id="destination"
        <constructor-arg value="amq.direct/shiftqueue" />

Not sure why it doesn't connect to the shiftqueue. 

View this message in context: http://qpid.2158936.n2.nabble.com/java-broker-with-jms-and-point-to-point-tp7582591p7582677.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

View raw message