qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Moravec <pmora...@redhat.com>
Subject Re: Java client and message release or reject
Date Fri, 09 Nov 2012 13:59:22 GMT
Hi Jan,
greping source code, I found just one possibility:

            ((AMQSession) ssn).rejectMessage((AbstractJMSMessage) msg, false);

that however does not invoke message.reject AMQP method, but rather message.release method.
I.e. it releases the message, not rejects.

So I think there is no way how to reject a message in qpid Java client.

Surely one can use message filters to get only selected messages, but the messages not matching
the filter would remain in the queue further.

Kind regards,
Pavel


----- Original Message -----
> From: "Jan Bares" <jan.bares@wood.cz>
> To: users@qpid.apache.org
> Sent: Thursday, November 8, 2012 6:13:57 PM
> 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:jan.bares@wood.cz]
> > Sent: Thursday, November 08, 2012 9:41 AM
> > To: users@qpid.apache.org
> > 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: philharveyonline@googlemail.com
> > > [mailto:philharveyonline@googlemail.com] On Behalf Of Phil Harvey
> > > Sent: Thursday, November 08, 2012 9:31 AM
> > > To: users@qpid.apache.org
> > > 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 <gordon.r.sim@gmail.com>
> > > 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:
> > > > users-unsubscribe@qpid.apache.**org<users-
> > > unsubscribe@qpid.apache.org>
> > > > For additional commands, e-mail: users-help@qpid.apache.org
> > > >
> > > >
> > 
> > 
> > 
> > 
> > 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: users-unsubscribe@qpid.apache.org
> > For additional commands, e-mail: users-help@qpid.apache.org
> 
> 
> 
> 
> 
> 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: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message