Prateek Shrivastava
Prateek Shrivastava

Reputation: 480

Is there any limit on the size of data that can be stored in Spring Integration message header

I have a requirement where I need to store a List of records in to Spring integration message header, so that it can be used later in the flow. This list can grow up to 100,000 records. I would like to know is there a limit on the size of data which can be stored in spring integration header?

Also is there any alternative approach which can be taken to fulfill this requirement for ex: claim check usage etc.

Thanks.

Upvotes: 0

Views: 222

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121282

If you don't do any persistence in between or don't propagate the message over messaging middleware (Kafka, JMS etc.), then all the data are in the memory and you definitely is just limited to what you have dedicated to JVM heap. So, if keeping those huge objects in the memory is the problem, then indeed a Claim Check is a good pattern to follow. This way the whole message is serialized to the external MessageStore which can restore later on via returned claim check key.

Upvotes: 1

Related Questions