I have one final question regarding Dead Letter Queues. I have configured both my
statement input and statement output queues to use a specific DLQ. Sometimes our MDBs are
given invalid data, usually due to file charset issues, and I'd like to be notified
processing fails so we can fix the input. When I fed our MDB invalid input I saw the
following behavior.
|
| * Send 4 messages to the queue StatementInput. 2 are valid 2 are not.
|
| * The MDB processes 2 messages, and throws exceptions on processing the 2 invalid
messages. As a result, these 2 messages should go in to the StatementDLQ
|
| * At this point, I go to the JMX console and view the information on both the DLQ and
StatementDLQ. StatementDLQ has a message count of 0, but DLQ has a message count of 2.
This seems to be the opposite of what I'd expect
|
| * Start the process that syncrhonously reads from the StatementDLQ queue. The first
time it tries to consume messages with the receiveNoWait() method null is returned. This
makes sense given that the JMX console says there are no messages in StatementDLQ
|
| * When the Queue monitor wakes up for its second pass 30 seconds later, it receives 2
messages from the queue StatementDLQ. I don't understand this, since the JMX console
says there are no messages in the queue.
|
|
Perhaps I'm missing the point, but after step 2, should StatementDLQ have a
MessageCount of 2 and DLQ have a MessageCount of 0? Below is my configuration from my
destinations-service.xml file.
| <!-- Input Queue for statements -->
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=StatementInput"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">
| jboss.messaging:service=ServerPeer
| </depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="DLQ">
| jboss.messaging.destination:service=Queue,name=StatementDLQ
| </attribute>
| <attribute name="Clustered">true</attribute>
| <attribute name="MaxDeliveryAttempts">2</attribute>
| <attribute name="FullSize">100</attribute>
| <attribute name="PageSize">50</attribute>
| <attribute name="DownCacheSize">50</attribute>
|
| </mbean>
|
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=StatementOutput"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">
| jboss.messaging:service=ServerPeer
| </depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="DLQ">
| jboss.messaging.destination:service=Queue,name=StatementDLQ
| </attribute>
| <attribute name="Clustered">true</attribute>
| <attribute name="FullSize">100</attribute>
| <attribute name="PageSize">50</attribute>
| <attribute name="DownCacheSize">50</attribute>
| </mbean>
|
|
| <!-- DLQ for statements -->
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=StatementDLQ"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">
| jboss.messaging:service=ServerPeer
| </depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="Clustered">true</attribute>
| <attribute name="FullSize">100</attribute>
| <attribute name="PageSize">50</attribute>
| <attribute name="DownCacheSize">50</attribute>
| </mbean>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145110#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...