ZF-11050: Zend_Queue can duplicate messages when using Postgres
There is wrong type chosen for "timestamp" as "real". It represents timestamp as 1.29716e+09 which is quite coarse and often leads to duplicate messages. The solution is to choose "double precision" or "bigint" with refactoring to integer value insted of float microtime.
I attach a patch which fixes Postgres schema
Index: Zend/Queue/Adapter/Db/postgresql.sql =================================================================== --- Zend/Queue/Adapter/Db/postgresql.sql (revision 13905) +++ Zend/Queue/Adapter/Db/postgresql.sql (working copy) @@ -38,7 +38,7 @@ handle character(32), body character varying(8192) NOT NULL, md5 character(32) NOT NULL, - timeout real, + timeout double precision, created integer, CONSTRAINT message_pk PRIMARY KEY (message_id), CONSTRAINT message_ibfk_1 FOREIGN KEY (queue_id)