[rabbitmq-discuss] Durable queues & bindings

Levi Greenspan greenspan.levi at googlemail.com
Sat Apr 11 22:27:44 BST 2009


Matthias,

On Sat, 2009-04-11 at 08:46 +0100, Matthias Radestock wrote:
> Levi,
> 
> Levi Greenspan wrote:
> > I upgraded to version 1.5.4 and now I see the queues and bindings after
> > the node is running again. However in 1.5.3 it didn't work for me.
> 
> I can't think of anything that has changed between 1.5.3 and 1.5.4 that 
> would cause this, except that startup times for when there are lots of 
> durable exchanges, queues or bindings have improved significantly. The 
> recreation of these entities is now also happening incrementally. So 
> it's possible that previously rabbitmqctl would not list any queues for 
> you if it was called right after you started the broker - though it 
> should have done so eventually - whereas now it does.


I have attached a small Java test client and a transcript which shows
the different behavior between version 1.5.3 and 1.5.4. Maybe you can
reproduce it.

> > Anyway I noticed another difference between 1.5.3 and 1.5.4 - the call
> > to com.rabbitmq.client.Connection.getKnownHosts() in that Java client
> > API returns the list of all running node addresses in 1.5.3, but only
> > one host address in 1.5.4 - a bug?
> 
> Nothing has changed in that area of the code. Are you sure that all your 
> nodes are running and listening?

Yes, I am. The test client prints the known hosts and for 1.5.3 the
reult is "localhost:5672", whereas for 1.5.4 it is "localhost:5673" and
"localhost:5672". Again I hope you can reproduce it with the attached
client. I am using Ubuntu 8.10 on x86 and I compiled erlang using the
offically released source, not the Ubuntu packages.

$ erl -version
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 5.6.5

Many thanks again,
Levi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test.java
Type: text/x-java
Size: 1094 bytes
Desc: not available
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090411/28c5dc16/attachment.java 
-------------- next part --------------
user at host ~ $ cd rabbitmq-server-1.5.3/
user at host ~/rabbitmq-server-1.5.3 $ scripts/rabbitmq-multi start_all 2
Starting all nodes...
Starting node rabbit at localhost...
RabbitMQ 1.5.3 (AMQP 8-0)
Copyright (C) 2007-2009 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.
Licensed under the MPL.  See http:/www.rabbitmq.com/

Logging to "/opt/logs/rabbitmq/rabbit.log"
SASL logging to "/opt/logs/rabbitmq/rabbit-sasl.log"

starting database             ...done
starting core processes       ...done
starting recovery             ...done
starting persister            ...done
starting guid generator       ...done
starting builtin applications ...done
starting TCP listeners        ...done

broker running
OK
Starting node rabbit_1 at localhost...
RabbitMQ 1.5.3 (AMQP 8-0)
Copyright (C) 2007-2009 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.
Licensed under the MPL.  See http:/www.rabbitmq.com/

Logging to "/opt/logs/rabbitmq/rabbit_1.log"
SASL logging to "/opt/logs/rabbitmq/rabbit_1-sasl.log"

starting database             ...done
starting core processes       ...done
starting recovery             ...done
starting persister            ...done
starting guid generator       ...done
starting builtin applications ...done
starting TCP listeners        ...done

broker running
OK
done.
user at host ~/rabbitmq-server-1.5.3 $ scripts/rabbitmqctl list_bindings
Listing bindings ...
...done.


    >>> Now I executed the test client in another shell. <<<


user at host ~/rabbitmq-server-1.5.3 $ scripts/rabbitmqctl list_bindings
Listing bindings ...
	my-queue	my-queue	[]
my-exchange	my-queue	my-key	[]
...done.
user at host ~/rabbitmq-server-1.5.3 $ scripts/rabbitmqctl stop
Stopping and halting node rabbit at localhost ...
Erlang has closed
...done.
user at host ~/rabbitmq-server-1.5.3 $ scripts/rabbitmq-server -detached
user at host ~/rabbitmq-server-1.5.3 $ scripts/rabbitmqctl list_bindings
Listing bindings ...
...done.
user at host ~/rabbitmq-server-1.5.3 $ scripts/rabbitmqctl list_bindings
Listing bindings ...
...done.
user at host ~/rabbitmq-server-1.5.3 $ scripts/rabbitmq-multi stop_all
Stopping all nodes...
Stopping node rabbit_1 at localhost
Erlang has closed
....OK
Stopping node rabbit at localhost
.OK
done.
user at host ~/rabbitmq-server-1.5.3 $ cd ../rabbitmq-server-1.5.4/


    >>> Deleted mnesia files to start from scratch. <<<


user at host ~/rabbitmq-server-1.5.4 $ scripts/rabbitmq-multi start_all 2
Starting all nodes...
Starting node rabbit at localhost...
RabbitMQ 1.5.4 (AMQP 8-0)
Copyright (C) 2007-2009 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.
Licensed under the MPL.  See http:/www.rabbitmq.com/

Logging to "/opt/logs/rabbitmq/rabbit.log"
SASL logging to "/opt/logs/rabbitmq/rabbit-sasl.log"

starting database             ...done
starting core processes       ...done
starting recovery             ...done
starting persister            ...done
starting guid generator       ...done
starting builtin applications ...done
starting TCP listeners        ...done

broker running
OK
Starting node rabbit_1 at localhost...
RabbitMQ 1.5.4 (AMQP 8-0)
Copyright (C) 2007-2009 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.
Licensed under the MPL.  See http:/www.rabbitmq.com/

Logging to "/opt/logs/rabbitmq/rabbit_1.log"
SASL logging to "/opt/logs/rabbitmq/rabbit_1-sasl.log"

starting database             ...done
starting core processes       ...done
starting recovery             ...done
starting persister            ...done
starting guid generator       ...done
starting builtin applications ...done
starting TCP listeners        ...done

broker running
OK
done.
user at host ~/rabbitmq-server-1.5.4 $ scripts/rabbitmqctl list_bindings
Listing bindings ...
...done.


    >>> Now I executed the test client in another shell. <<<


user at host ~/rabbitmq-server-1.5.4 $ scripts/rabbitmqctl list_bindings
Listing bindings ...
	my-queue	my-queue	[]
my-exchange	my-queue	my-key	[]
...done.
user at host ~/rabbitmq-server-1.5.4 $ scripts/rabbitmqctl stop
Stopping and halting node rabbit at localhost ...
...done.
Erlang has closed
user at host ~/rabbitmq-server-1.5.4 $ scripts/rabbitmq-server -detached
user at host ~/rabbitmq-server-1.5.4 $ scripts/rabbitmqctl list_bindings
Listing bindings ...
	my-queue	my-queue	[]
my-exchange	my-queue	my-key	[]
...done.
user at host ~/rabbitmq-server-1.5.4 $


More information about the rabbitmq-discuss mailing list