Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-1925

timestamp header is not retained after deserialization

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Component/s: JMS Support
    • Labels:
      None

      Description

      We use JMS as a persistent temporary storage for later logging our Spring Integration messages into the database. Parts of message headers and payload are logged including a timestamp header. The problem is that this header is always set to current time after deserialization, since ChannelPublishingJmsMessageListener.onMessage method calls MessageBuilder.build method, which calls GenericMessage constructor, which then calls MessageHeaders and inside this constructor, this.headers.put(TIMESTAMP, new Long(System.currentTimeMillis())) is executed unconditionally. It means that there is no way to get the original timestamp when deserialized message was created.

      Proposed solution is to modify MessageHeaders constructor so that timestamp is restored in the same way as message id.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mark.fisher Mark Fisher
                Reporter:
                menulis Džiugas Baltrūnas
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: