Hi all,

I'm running some problems upgrading qpid broker/client to 0.8.

Currently I'm using the Qpid C++ Broker + Qpid java client, both updated to
0.8.

Now when I try to create a producer like:

 Context _ctx = new InitialContext( properties );
 ConnectionFactory connectionFactory = (ConnectionFactory) _ctx
                        .lookup("local");
 Connection connection = connectionFactory.createConnection();
 Connection connection.start();
 Destination dest = (Destination)_ctx.lookup( "queue" );
 Session session = _connection.createSession( false,
                           javax.jms.Session.AUTO_ACKNOWLEDGE );
 Producer producer = session.createProducer( dest ); // Error here

And my properties:

Properties p = new Properties();
p.put( Context.INITIAL_CONTEXT_FACTORY,
"org.apache.qpid.jndi.PropertiesFileInitialContextFactory" );
p.put( "connectionfactory.local",
"amqp://#####:##...@clientid/localhost?brokerlist='host:port;host:port'" );
p.put( "destination.queue", "fanout://#binding_name//#queue_name" );

I'm getting a error when I try to create a producer:

 Exception occured while verifying destinationorg.apache.qpid.AMQException:
The name 'fanout:' supplied in the address doesn't resolve to an exchange or
a queue
    at
org.apache.qpid.client.AMQSession_0_10.handleAddressBasedDestination(AMQSession_0_10.java:1180)
    at
org.apache.qpid.client.BasicMessageProducer_0_10.declareDestination(BasicMessageProducer_0_10.java:82)
    at
org.apache.qpid.client.BasicMessageProducer.<init>(BasicMessageProducer.java:141)
    at
org.apache.qpid.client.BasicMessageProducer_0_10.<init>(BasicMessageProducer_0_10.java:61)
    at
org.apache.qpid.client.AMQSession_0_10.createMessageProducer(AMQSession_0_10.java:664)
    at
org.apache.qpid.client.AMQSession_0_10.createMessageProducer(AMQSession_0_10.java:79)
    at org.apache.qpid.client.AMQSession$6.execute(AMQSession.java:2559)
    at org.apache.qpid.client.AMQSession$6.execute(AMQSession.java:2554)
    at
org.apache.qpid.client.AMQConnectionDelegate_0_10.executeRetrySupport(AMQConnectionDelegate_0_10.java:286)
    at
org.apache.qpid.client.AMQConnection.executeRetrySupport(AMQConnection.java:766)
    at
org.apache.qpid.client.failover.FailoverRetrySupport.execute(FailoverRetrySupport.java:102)
    at
org.apache.qpid.client.AMQSession.createProducerImpl(AMQSession.java:2552)
    at
org.apache.qpid.client.AMQSession.createProducerImpl(AMQSession.java:2546)
    at
org.apache.qpid.client.AMQSession.createProducer(AMQSession.java:1171)
    at org.apache.qpid.client.AMQSession.createProducer(AMQSession.java:120)

The exact same code used to work in 0.6. I'm not sure how the "fanout://"
address in destination should cause any error.

I wonder if anyone knows what is wrong?

Thanks,

Tim

Reply via email to