You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Fraser Adams <fr...@blueyonder.co.uk> on 2012/02/11 10:41:40 UTC
What does making an exchange persistent actually do?
This might be a slightly weird question, but what does making an
exchange persistent actually do?
What I mean is that one of the behaviours that I'd really like with Qpid
is to be able to have *configuration* persisted.
With queues if I make the queue durable then I end up with queue config
that survives broker restarts, but unfortunately (for my scenario) I
also end up with a queue that persists messages and gives me a
performance hit etc. which I don't want.
So what about exchanges? If I create an exchange marked as durable does
this simply persist the exchange configuration and allow it to be
recreated automatically on broker restart or does it also mess with
messages (in other words does a durable exchange do anything specific on
the message flow performance critical path that might affect message
flow performance?)
Does anyone have any thoughts on how easy it might be to add a switch
like "durable-config" (as opposed to "durable") to queue creation. I've
got a nasty feeling that it might be harder than it sounds as I think
that queues can be created via QMF and also by underlying queueDeclare
methods (I *think* qpid-config and Address parsing use the latter) so I
guess that one would have to be careful to avoid breaking anything that
relies on the current method signature.
MTIA
Frase
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: What does making an exchange persistent actually do?
Posted by Robbie Gemmell <ro...@gmail.com>.
I know you are actually using the C++ broker, but I dont imagine the
answers to these questions are any different than for the Java broker
broker so...
On 11 February 2012 09:41, Fraser Adams <fr...@blueyonder.co.uk> wrote:
>
> This might be a slightly weird question, but what does making an exchange
> persistent actually do?
>
For the Java broker at least this would make the exchange
configuration (name, type, arguments) get persisted in the config
store, and would also mean that bindings for any durable queues bound
to the exchange would then also get persisted.
> What I mean is that one of the behaviours that I'd really like with Qpid is
> to be able to have *configuration* persisted.
>
>
> With queues if I make the queue durable then I end up with queue config that
> survives broker restarts, but unfortunately (for my scenario) I also end up
> with a queue that persists messages and gives me a performance hit etc.
> which I don't want.
>
As William mentioned, this is because the messages themselves are
marked as persistent (I dont know about the other language clients,
but the Java client defaults to this as required by JMS). If the queue
isnt durable then the messages will be lost on restart regardless, but
if the queue is durable and the message requests it then it will get
persisted.
We have toyed in the past with adding the kind of queue config option
you suggest below to the Java broker to allow queues to be durable in
the sense they are always present, but not actually cause the messages
to be retained on restart. You can actually sort of do this already at
the moment with the configuration files by specifying non-durable
queues, but I imagine some upcoming config work will allow specifying
such queues in new ways.
>
> So what about exchanges? If I create an exchange marked as durable does this
> simply persist the exchange configuration and allow it to be recreated
> automatically on broker restart or does it also mess with messages (in other
> words does a durable exchange do anything specific on the message flow
> performance critical path that might affect message flow performance?)
>
Exchange persistence can affect queue binding persistence, but it
should have no performance bearing on message flow.
> Does anyone have any thoughts on how easy it might be to add a switch like
> "durable-config" (as opposed to "durable") to queue creation. I've got a
> nasty feeling that it might be harder than it sounds as I think that queues
> can be created via QMF and also by underlying queueDeclare methods (I
> *think* qpid-config and Address parsing use the latter) so I guess that one
> would have to be careful to avoid breaking anything that relies on the
> current method signature.
>
> MTIA
> Frase
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: What does making an exchange persistent actually do?
Posted by William Henry <wh...@redhat.com>.
----- Original Message -----
> Hi William,
> Thanks for the response.
>
> Sorry yes you are correct I should have been more specific, with a
> durable queue messages don't get persisted if the messages aren't
> marked
> as durable however marking messages as durable is the default
> behaviour
> (certainly for JMS producers) and I'm not really able to rely on
> producers explicitly disabling this, so I'd quite like to be able to
> let
> the queue make the choice.
>
> Unfortunately there aren't two settings for queues, which is why I
> raised the question.
>
> So would queues marked as durable really have zero performance impact
> on
> messages marked as non-durable?
I can't see any reason why there would be an real impact. A durable queue
is merely marked for re-creation if the broker is restarted.
I'm talking about the C++ broker here.
The code checks the message whether it is durable queue or not. From
the enqueue method in the C++ broker:
if ((msg->isPersistent() || msg->checkContentReleasable()) && store) {
'store' is whether the the queue is durable or not.
So no impact in the C++ broker.
William
>
> Frase
>
>
> On 11/02/12 18:47, William Henry wrote:
> >
> > William
> >
> >
> > On Feb 11, 2012, at 2:42 AM, Fraser
> > Adams<fr...@blueyonder.co.uk> wrote:
> >
> >> This might be a slightly weird question, but what does making an
> >> exchange persistent actually do?
> >>
> >> What I mean is that one of the behaviours that I'd really like
> >> with Qpid is to be able to have *configuration* persisted.
> >>
> >>
> >> With queues if I make the queue durable then I end up with queue
> >> config that survives broker restarts, but unfortunately (for my
> >> scenario) I also end up with a queue that persists messages and
> >> gives me a performance hit etc. which I don't want.
> > I didn't think this was the case if messages were not marked
> > persistent. Are you sure? Are you using JMS and is this an
> > artifact of using JMS?
> >>
> >> So what about exchanges? If I create an exchange marked as durable
> >> does this simply persist the exchange configuration and allow it
> >> to be recreated automatically on broker restart or does it also
> >> mess with messages (in other words does a durable exchange do
> >> anything specific on the message flow performance critical path
> >> that might affect message flow performance?)
> > No effect on messages. Just means exchange will survive a restart.
> > Durable queues were supposed to have the same behavior. Perhaps
> > that has changed or perhaps there are two settings for queues now
> > (?)
> >
> > William
> >
> >> Does anyone have any thoughts on how easy it might be to add a
> >> switch like "durable-config" (as opposed to "durable") to queue
> >> creation. I've got a nasty feeling that it might be harder than
> >> it sounds as I think that queues can be created via QMF and also
> >> by underlying queueDeclare methods (I *think* qpid-config and
> >> Address parsing use the latter) so I guess that one would have to
> >> be careful to avoid breaking anything that relies on the current
> >> method signature.
> >>
> >> MTIA
> >> Frase
> >>
> >> ---------------------------------------------------------------------
> >> Apache Qpid - AMQP Messaging Implementation
> >> Project: http://qpid.apache.org
> >> Use/Interact: mailto:users-subscribe@qpid.apache.org
> >>
> > ---------------------------------------------------------------------
> > Apache Qpid - AMQP Messaging Implementation
> > Project: http://qpid.apache.org
> > Use/Interact: mailto:users-subscribe@qpid.apache.org
> >
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: What does making an exchange persistent actually do?
Posted by Fraser Adams <fr...@blueyonder.co.uk>.
Hi William,
Thanks for the response.
Sorry yes you are correct I should have been more specific, with a
durable queue messages don't get persisted if the messages aren't marked
as durable however marking messages as durable is the default behaviour
(certainly for JMS producers) and I'm not really able to rely on
producers explicitly disabling this, so I'd quite like to be able to let
the queue make the choice.
Unfortunately there aren't two settings for queues, which is why I
raised the question.
So would queues marked as durable really have zero performance impact on
messages marked as non-durable?
Frase
On 11/02/12 18:47, William Henry wrote:
>
> William
>
>
> On Feb 11, 2012, at 2:42 AM, Fraser Adams<fr...@blueyonder.co.uk> wrote:
>
>> This might be a slightly weird question, but what does making an exchange persistent actually do?
>>
>> What I mean is that one of the behaviours that I'd really like with Qpid is to be able to have *configuration* persisted.
>>
>>
>> With queues if I make the queue durable then I end up with queue config that survives broker restarts, but unfortunately (for my scenario) I also end up with a queue that persists messages and gives me a performance hit etc. which I don't want.
> I didn't think this was the case if messages were not marked persistent. Are you sure? Are you using JMS and is this an artifact of using JMS?
>>
>> So what about exchanges? If I create an exchange marked as durable does this simply persist the exchange configuration and allow it to be recreated automatically on broker restart or does it also mess with messages (in other words does a durable exchange do anything specific on the message flow performance critical path that might affect message flow performance?)
> No effect on messages. Just means exchange will survive a restart. Durable queues were supposed to have the same behavior. Perhaps that has changed or perhaps there are two settings for queues now (?)
>
> William
>
>> Does anyone have any thoughts on how easy it might be to add a switch like "durable-config" (as opposed to "durable") to queue creation. I've got a nasty feeling that it might be harder than it sounds as I think that queues can be created via QMF and also by underlying queueDeclare methods (I *think* qpid-config and Address parsing use the latter) so I guess that one would have to be careful to avoid breaking anything that relies on the current method signature.
>>
>> MTIA
>> Frase
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project: http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: What does making an exchange persistent actually do?
Posted by William Henry <wh...@redhat.com>.
William
On Feb 11, 2012, at 2:42 AM, Fraser Adams <fr...@blueyonder.co.uk> wrote:
>
> This might be a slightly weird question, but what does making an exchange persistent actually do?
>
> What I mean is that one of the behaviours that I'd really like with Qpid is to be able to have *configuration* persisted.
>
>
> With queues if I make the queue durable then I end up with queue config that survives broker restarts, but unfortunately (for my scenario) I also end up with a queue that persists messages and gives me a performance hit etc. which I don't want.
I didn't think this was the case if messages were not marked persistent. Are you sure? Are you using JMS and is this an artifact of using JMS?
>
>
> So what about exchanges? If I create an exchange marked as durable does this simply persist the exchange configuration and allow it to be recreated automatically on broker restart or does it also mess with messages (in other words does a durable exchange do anything specific on the message flow performance critical path that might affect message flow performance?)
No effect on messages. Just means exchange will survive a restart. Durable queues were supposed to have the same behavior. Perhaps that has changed or perhaps there are two settings for queues now (?)
William
>
> Does anyone have any thoughts on how easy it might be to add a switch like "durable-config" (as opposed to "durable") to queue creation. I've got a nasty feeling that it might be harder than it sounds as I think that queues can be created via QMF and also by underlying queueDeclare methods (I *think* qpid-config and Address parsing use the latter) so I guess that one would have to be careful to avoid breaking anything that relies on the current method signature.
>
> MTIA
> Frase
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org