Is there a way to query a Spring Integration channel for the last time it received a message?
Asked
Active
Viewed 31 times
1 Answers
2
Looking at the classes QueueChannel and AbstractPollableChannel, no there isn't.
The only option you have is to rely on message header timestamp
, which is included into each message as its creation time. So if the message was created just before hitting the QueueChannel
(e.g. by passive components like Transformer, Enricher or Gateway) it gives you pretty close time it arrived to your QueueChannel
.

luboskrnac
- 23,973
- 10
- 81
- 92
-
Sounds good. I guess I can then set that timestamp into a transient singleton and everything will be aware. – Nixx Aug 31 '15 at 14:30