-
1. Re: DLQ messages stored forever - how to access?
h.wolffenbuttel Oct 28, 2009 4:39 AM (in response to tomeicher)Hi,
Accessing content from a DLQ can be done by using the method getAllMessages() from class org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl by using the classification DLQ. The class deserializes and decodes the message.
Regards.
Hans -
2. Re: DLQ messages stored forever - how to access?
tomeicher Nov 2, 2009 10:10 AM (in response to tomeicher)
Thanks! I'll try to build a basic client to display the contents.
But what is the grand master plan here for people using an ESB
in production ? Shall we have a cron job deleting those message
once a week ? Or are they supposed to be picked up by some service ?
Currently, they are only expanding the footprint of our DB...
Cheers, Tom. -
3. Re: DLQ messages stored forever - how to access?
h.wolffenbuttel Nov 3, 2009 4:15 AM (in response to tomeicher)Hi,
I face the same problem and haven't got an answer yet. But I might try to build something like a jBPM process which can show me the messages before I delete them. This means its possible for the users to discard the messages themselves.
Anyone else have any thoughts on this?
Regards,
Hans -
4. Re: DLQ messages stored forever - how to access?
tomeicher Nov 3, 2009 7:29 AM (in response to tomeicher)FYAI: to get a first glimpse of what's in your DLQ, you can
just put a JSP as silly as the following in your
/server/default/deploy/jboss-web.deployer/ROOT.war/ ...<html> <body> <h1>DLQ contents</h1> <% org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl storeImpl = new org.jboss.internal.soa.esb.persistence.format.db.DBMessageStoreImpl(); java.util.Map<java.net.URI, org.jboss.soa.esb.message.Message> map = storeImpl.getAllMessages("DLQ"); for (org.jboss.soa.esb.message.Message msg : map.values()) { if (msg.getBody().get()==null) continue; %> <pre> <%=msg.getBody().get().toString().replaceAll("<","<").replaceAll(">",">")%> </pre> <hr> <% } %> </body> </html>
Feel free to develop it from here, and post back your findings :-)