So essentially the concept is that we will create a error queue which is nothing but a simple queue and we will use it for handling the errored message.I am not coming up with a whole scenario ,just the basic idea which you can use to implement in your business logic.
First of all create a queue called as "Error Queue" within you JMS Module.


Use the existing subdeployment and target it to the JMS server you have created

Now we have the error queue we can use this queue to store the error message.
If you already have a queue(MessageQueue) which is handling the request we will
define the error queue for it.Click on your MessageQueue and go to
Configuration--> delivery Failure

Now check out the value i have defined here.
In the expiration policy i have defined it to redirect and the destination is
ErrorQueue,i.e expired message has to be redirected to the ErrorQueue that we
have defined.Further redirect limit is 5 and redelivery delay override is 1000
which means try to redeliver the same message 5 times at an interval of 1000ms.
So i believe you have now got an idea how to design an error and use it in your
scenario.
No comments:
Post a Comment