qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Map messages and using QPID & store module for a store&forward queue
Date Wed, 20 May 2009 11:43:57 GMT
Carl Trieloff wrote:
> Omri Schwarz wrote:
>> Hi, all. I have QPID checked out from SVN, along with the RHM store 
>> module, to try to build a simple AMQP store&forward durable queue server.
>> I am trying to use mostly Python, and so I changed the python direct 
>> example scripts so that the declare_queues script adds "durable = 
>> True" to the queues. That does create the data_store in all its glory, 
>> but then when I load the messages and stop qpidd, I see the 
>> messages.db file isn't updated with them, and therefore the messages 
>> are not being persisted to disk.
>> Is there something more I should be doing ?
>> Also, what is the proper way to use QPID to send the equivalent of a 
>> MapMessage in Apache ActiveMQ?

As yet there is no built in support for map messages in python, but that 
is coming soon. Its possible to build it above the client if required 
also. Attached is an example that uses the same encoding for map 
messages as the current Qpid JMS client if that's any use.

>> Thanks, all.
> The messages also need to be marked durable. 

You do this by specifying a delivery_mode of 2 in the delivery 
properties. E.g.

   dp = session.delivery_properties(routing_key="my-q", delivery_mode=2)
   session.message_transfer(message=Message(dp, "my-message"))

> transient messages onto 
> durable queues are still transient in AMQP. Also note that the 
> messages.db file is only used for staging, in non-staged durability they 
> will go into a jrnl file.
> regards
> Carl.
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message