There is nothing called as Error queue as such in weblogic.It is basically a queue that we define to store the errored message.Consider a normal scenario where in you are polling a data from database and finally after doing some transformation writing in to a queue.Somehow the server is not able to queue it up to the target queue causing some exceptions.We can get rid of this by moving such errored message to another queue.
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