Is there any particular reason why rejectMessage() still calls messageRelease()
? Should I file bug report? This is from QPID 0.18.
Thanks, Jan
/**
* Release (0_8 notion of Reject) an acquired message
*
* @param deliveryTag the message ID
* @param requeue always true
*/
public void rejectMessage(long deliveryTag, boolean requeue)
{
// The value of requeue is always true
RangeSet ranges = RangeSetFactory.createRangeSet();
ranges.add((int) deliveryTag);
flushProcessed(ranges, false);
if (requeue)
{
getQpidSession().messageRelease(ranges);
}
else
{
getQpidSession().messageRelease(ranges, Option.SET_REDELIVERED);
}
//I don't think we need to sync
}
> -----Original Message-----
> From: Jan Bares [mailto:[email protected]]
> Sent: Thursday, November 08, 2012 6:14 PM
> To: [email protected]
> Subject: RE: Java client and message release or reject
>
> Does the Java client support message reject? I am not speaking about JMS
> API, but it seems that even internally there is no support for reject, just
> release (and redeliver). Can someone confirm that please?
>
> Thanks, Jan
>
> > -----Original Message-----
> > From: Jan Bares [mailto:[email protected]]
> > Sent: Thursday, November 08, 2012 9:41 AM
> > To: [email protected]
> > Subject: RE: Java client and message release or reject
> >
> > Hi Phil,
> >
> > I ommitted this in my question, I am using C++ broker.
> >
> > Currenlty I am testing a hack - casting JMS object to the underlying QPID
> > imlementing classes and using whats available there. If anybody did that
> > before me, let me know if it worked. And yes, I know its not portable and
> > even may not work after upgrade but I can live with that.
> >
> > Regards, Jan
> >
> > > -----Original Message-----
> > > From: [email protected]
> > > [mailto:[email protected]] On Behalf Of Phil Harvey
> > > Sent: Thursday, November 08, 2012 9:31 AM
> > > To: [email protected]
> > > Subject: Re: Java client and message release or reject
> > >
> > > Jan,
> > >
> > > I'm not sure which broker you're using. If you're using the Java Broker,
> > > note that you can configure it to send messages to the dead letter queue
> > > after N attempts with this sort of thing in your virtualhosts.xml:
> > >
> > > ...
> > > <queues>
> > > <maximumDeliveryCount>1</maximumDeliveryCount>
> > > ...
> > >
> > > The delivery count is incremented each time the message is rejected by
> > the
> > > client, eg when it explicitly calls session.rollback() after your
> > > application code decides that its format is wrong.
> > >
> > > If that looks like it might be useful then I send a more complete example,
> > > i.e. including the specification of the alternate exchange.
> > >
> > > Phil
> > >
> > >
> > > On 7 November 2012 12:45, Gordon Sim <[email protected]>
> wrote:
> > >
> > > > On 11/07/2012 12:11 PM, Jan Bares wrote:
> > > >
> > > >> we are planning to reject messages that do not satisfy message
> contract
> > > >> (e.g. message is of wrong format). The reject and DLQ seems to be
> the
> > > right
> > > >> solution for this problem.
> > > >>
> > > >
> > > > At present the only thing I can suggest is that you have the client
> > > > itself
> > > > send the 'rejected' message to the DLQ (or exchange or whatever). You
> > > can
> > > > do this before acknowledging it to avoid losing it on failure if that is
> > > > important.
> > > >
> > > > Longer term perhaps the JMS client could recognise a certain category
> of
> > > > exception thrown by a MessageListener and interpret that as a desire
> to
> > > > reject the message in question. Any thoughts on that from the JMS
> devs?
> > > >
> > > >
> > > > ------------------------------**------------------------------**---------
> > > > To unsubscribe, e-mail: [email protected].**org<users-
> > > [email protected]>
> > > > For additional commands, e-mail: [email protected]
> > > >
> > > >
> >
> >
> >
> >
> > DISCLAIMER
> > WOOD & Company Financial Services, a.s. and its branches are authorized
> > and regulated by the CNB as Home State regulator and in Poland by the
> KNF,
> > in Romania by the CNVM, in Slovakia by the NBS and in the UK by the FSA
> as
> > Host State regulators. For further information about WOOD & Co., its
> > investment services, financial instruments and associated risks, safeguard
> > client assets (incl. compensation schemes) and contractual relationship
> > please see our website at www.wood.cz under section Corporate
> > Governance.
> >
> > Unless otherwise stated, this transmission is neither an offer nor the
> > solicitation of an offer to sell or purchase any investment. All estimates,
> > opinions and other information contained herein are subject to change
> > without notice and are provided in good faith but without legal
> responsibility
> > or liability. Opinion may be personal to the author and may not reflect the
> > opinions of WOOD & Co. Communications from sales persons, sales traders
> > or traders should not be regarded as investment research and may contain
> > opinions or trading ideas which are different from WOOD & Co. investment
> > research opinions.
> >
> > This e-mail and any attachments are confidential and may be privileged or
> > otherwise protected from disclosure. If you are not a named addressee
> you
> > must not use, disclose, distribute, copy, print or rely on this e-mail and
> > any
> of
> > its attachments. Please notify the sender that you have received this email
> > by mistake by replying to the email, and then delete the email and any
> copies
> > of it. Although WOOD & Co. routinely screens e-mails for viruses,
> addressees
> > should scan this e-mail and any attachments for viruses. WOOD & Co.
> makes
> > no representation or warranty as to the absence of viruses in this e-mail or
> > any attachments. Please note that to ensure regulatory compliance and for
> > the protection of our clients and business, we may monitor and read e-
> mails
> > sent to and from our server(s).
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
>
>
>
>
>
> DISCLAIMER
> WOOD & Company Financial Services, a.s. and its branches are authorized
> and regulated by the CNB as Home State regulator and in Poland by the KNF,
> in Romania by the CNVM, in Slovakia by the NBS and in the UK by the FSA as
> Host State regulators. For further information about WOOD & Co., its
> investment services, financial instruments and associated risks, safeguard
> client assets (incl. compensation schemes) and contractual relationship
> please see our website at www.wood.cz under section Corporate
> Governance.
>
> Unless otherwise stated, this transmission is neither an offer nor the
> solicitation of an offer to sell or purchase any investment. All estimates,
> opinions and other information contained herein are subject to change
> without notice and are provided in good faith but without legal responsibility
> or liability. Opinion may be personal to the author and may not reflect the
> opinions of WOOD & Co. Communications from sales persons, sales traders
> or traders should not be regarded as investment research and may contain
> opinions or trading ideas which are different from WOOD & Co. investment
> research opinions.
>
> This e-mail and any attachments are confidential and may be privileged or
> otherwise protected from disclosure. If you are not a named addressee you
> must not use, disclose, distribute, copy, print or rely on this e-mail and
> any of
> its attachments. Please notify the sender that you have received this email
> by mistake by replying to the email, and then delete the email and any copies
> of it. Although WOOD & Co. routinely screens e-mails for viruses, addressees
> should scan this e-mail and any attachments for viruses. WOOD & Co. makes
> no representation or warranty as to the absence of viruses in this e-mail or
> any attachments. Please note that to ensure regulatory compliance and for
> the protection of our clients and business, we may monitor and read e-mails
> sent to and from our server(s).
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
DISCLAIMER
WOOD & Company Financial Services, a.s. and its branches are authorized and
regulated by the CNB as Home State regulator and in Poland by the KNF, in
Romania by the CNVM, in Slovakia by the NBS and in the UK by the FSA as Host
State regulators. For further information about WOOD & Co., its investment
services, financial instruments and associated risks, safeguard client assets
(incl. compensation schemes) and contractual relationship please see our
website at www.wood.cz under section Corporate Governance.
Unless otherwise stated, this transmission is neither an offer nor the
solicitation of an offer to sell or purchase any investment. All estimates,
opinions and other information contained herein are subject to change without
notice and are provided in good faith but without legal responsibility or
liability. Opinion may be personal to the author and may not reflect the
opinions of WOOD & Co. Communications from sales persons, sales traders or
traders should not be regarded as investment research and may contain opinions
or trading ideas which are different from WOOD & Co. investment research
opinions.
This e-mail and any attachments are confidential and may be privileged or
otherwise protected from disclosure. If you are not a named addressee you must
not use, disclose, distribute, copy, print or rely on this e-mail and any of
its attachments. Please notify the sender that you have received this email by
mistake by replying to the email, and then delete the email and any copies of
it. Although WOOD & Co. routinely screens e-mails for viruses, addressees
should scan this e-mail and any attachments for viruses. WOOD & Co. makes no
representation or warranty as to the absence of viruses in this e-mail or any
attachments. Please note that to ensure regulatory compliance and for the
protection of our clients and business, we may monitor and read e-mails sent to
and from our server(s).
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]