[
https://issues.apache.org/jira/browse/AMQ-4666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jaewoong Choi updated AMQ-4666:
-------------------------------
Attachment: MemoryLimitTest.java
This simple standalone test case will demonstrate the blocking situation.
Changing prefetch limit "prefetchLimitForAll" will just move the blocking
point. Please toggling "patchApplied" to see how the workaround works.
> Topic persistent message publishing is blocked by hitting 100% of
> per-destination memory limit if there's any durable subscriber connected but
> not consuming.
> -------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-4666
> URL: https://issues.apache.org/jira/browse/AMQ-4666
> Project: ActiveMQ
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.7.0
> Reporter: Jaewoong Choi
> Attachments: MemoryLimitTest.java
>
>
> Failing scenario:
> 1. Embedded broker starts with the following configurations:
> - persistent = true,
> - systemUsage.memoryUsage.limit = 10*1024*1024 // 10mb broker main memory
> limit
> - destinationPolicy.policyEntry.memoryLimit = 1*1024*1024 // 1mb
> per-destination memory limit
> 2. Create a topic durable subscription with prefetchLimit=0.
> 3. Create a topic publisher and publish persistent 400kb messages.
> 4. (Problem) After publishing 3 messages successfully, PFC kicks in and the
> above topic publisher gets blocked its publishing.
> At step #4, the expectation is not seeing any publisher blocking for the
> persistent message publishing until the store limit is reached. How come the
> persistent message publishing is limited by 100% memory full?
> Per the code inspection, this is because the store cursor of the topic
> durable subscriber (i.e. TopicStorePrefetch) is working with the main
> broker's memory limit, not with the per-destination memory limit. Hence, it
> keeps increasing broker main memory usage over the per-destination memory
> limit and after it reached 100% of per-destination limit, PFC kicked in.
> I verified that the above scenario went through well if I fix the store
> cursor to use/refer-to the per-destination memory usage along with its
> pending list (cache) management.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira