I am writing a dead letter manager in java for rabbitmq and I can get the message from the dead letter queue, access the properties, headers, then get the x-death header e.g.
[{reason=rejected, count=1, exchange=x1, time=Fri Oct 14 13:32:52 MST 2016, routing-keys=[mykey1], queue=q1}]
and I know there could be multiple tuples in the list if the queue+reason are not the same. However, I have not found a practical way to parse out the fields in this string so that I can use them. I tried using
1:8 token recognition error at: '='
com.metadave.etp.ETP$ParseException: ETP parse error
I also looked at jinterface, but that did not seem to be able to handle this issue either. At this point I am looking at regex, but wanted to know how others were handling this or see if there are any better suggestions.
Any help is always appreciated.
Cheers,
Gregg