[ 
https://issues.apache.org/jira/browse/ARTEMIS-1497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram resolved ARTEMIS-1497.
-------------------------------------
    Resolution: Won't Do

Messages on a queue are immutable. You can't change them on the client (e.g. 
set a property) and expect that to be reflected on the broker. I don't think 
this is feasible to implement.

> Destroy message instead of sending it to DLQ
> --------------------------------------------
>
>                 Key: ARTEMIS-1497
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1497
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>          Components: Broker
>    Affects Versions: 2.3.0
>         Environment: ActiveMQ 2.3
>            Reporter: Tom Ross
>            Priority: Trivial
>
> Customer would like to have an option of destroying certain messages instead 
> of sending them to DLQ in case message processing fails. 
> Below is an example of what they think could happen:
> {noformat}
> public class HelloMDB implements MessageListener {
>     MessageDrivenContext ctx;
>     @Override
>     public void onMessage(Message message) {
>         
>         try {
>             
>             doSomeInsertsButThenFailBecauseOfDataThatMakesNoSense();
>             
>         } catch (UnableToProcessMessageBecauseOfDataThatMakesNoSense e) {
>             
>             ctx.setRollbackOnly(); // we do not want to commit, because we do 
> not know how many inserts we did before we failed
>             
>             try {
>                 
> message.setBooleanProperty("DESTROY_INSTEAD_OF_GOING_TO_ERROR_QUEUE", true);
>             } catch (JMSException ex) {
>                 throw new RuntimeException("unable to set destroy property", 
> e);
>             }
>         }
>     }
> {noformat}
> In the case above they would like a message that was a rolled back and tagged 
> with DESTROY_INSTEAD_OF_GOING_TO_ERROR_QUEUE property to be destroyed instead 
> of send to DLQ. If that happens they would like the broker to log that 
> instance in the server log file.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to