Looking at this further, it seems to me that the optimisation is already
implemented... in the org.apache.qpid.server.txn.*Transaction classes,
calls to _transaction.enqueue(queue, message) are always guarded
by if(queue.getMessageDurability().persist(message.isPersistent())) ; thus
the store() method on the StoredBDBMessage or StoredJDBCMessage is never
called.  The message should thus only be stored on disk if flowToDisk()
gets called.

Of course if the message is routed to multiple queues and one of the queues
does require the message to be persisted, then the message isn't
automatically removed from the store until it has been removed from *all*
queues (not just those that require persistence).

Bryan - can you provide a minimal virtual host config and client program
demonstrating this behaviour?

-- Rob

On 21 March 2018 at 16:00, Rob Godfrey <[email protected]> wrote:

> Alex,
>
> we should probably see if we can optimise this... If a message is only
> sent to queues which are non-durable or override message durability to
> never, then we could avoid storing the message (or at least immediately
> delete it from the store, and not wait for confirmation the message is in
> the store before acknowledging the incoming message)
>
> -- Rob
>
> On 21 March 2018 at 15:29, Oleksandr Rudyy <[email protected]> wrote:
>
>> Hi Brian,
>>
>> A queue attribute 'messageDurability' set to NEVER will stop queue
>> message entries from storing in the message store. Thus, on broker
>> restart the queue entries would be removed.
>> However, queue  'messageDurability' does not affect storing of message
>> content. If you send a persistent message, its content will be stored
>> regardless the value of queue 'messageDurability'.
>>
>> Kind Regards,
>> Alex
>>
>> On 21 March 2018 at 13:37, bryand <[email protected]> wrote:
>> > We are using Broker-J 7.0.2.  For a couple of Queues I've set setting
>> Persist
>> > Messages? to 'Never'.  However when sending a message via a Qpid JMS
>> 0.30.0
>> > client the messages are being stored as Persistent.  I've tried both
>> methods
>> > MessageProducer.send(Message message) and MessageProducer.send(Message
>> > message, int deliveryMode, int priority, long timeToLive) (using
>> > DeliveryMode.PERSISTENT for deliveryMode) and both result in persistent
>> > messages in the Queue.  Since I had the queue configured to Never
>> persist
>> > messages I wasn't expecting that behavior - maybe I'm misunderstanding
>> this
>> > setting?
>> >
>> > When I use a DeliveryMode.NON_PERSISTENT for the deliveryMode then
>> messages
>> > are not persistent as expected.
>> >
>> > Thanks
>> > Bryan
>> >
>> >
>> >
>> > --
>> > Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936
>> .html
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [email protected]
>> > For additional commands, e-mail: [email protected]
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>

Reply via email to