1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
523 views
by amanda-w-3695 (5.1k points)
edited by amanda-w-3695

1 Answer

0 votes
No, when a message is processed it remains in memory until a Minor Garbage Collection is run. This happens automatically when Eden Space fills up. Java will then move the messages that are still processing to Survivor Space. Once that fills, Java will do another check to see what messages are still being processed and put those messages into Tenured Gen. When that queue fills, Java will run a Major Garbage Collection. If after running a Major Garbage Collection there is still not enough room for a message in memory, a Java Memory Exception is thrown.
by amanda-w-3695 (5.1k points)
...