GemFire Issue: java.lang.IllegalStateException: Cannot create GatewaySender AsyncEventQueue_JobQueue because the maximum (128) has been reached
search cancel

GemFire Issue: java.lang.IllegalStateException: Cannot create GatewaySender AsyncEventQueue_JobQueue because the maximum (128) has been reached

book

Article ID: 404697

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

When creating a new AsyncEventQueue or GatewaySender in VMware Tanzu GemFire, users may encounter the following error:

java.lang.IllegalStateException: Cannot create GatewaySender AsyncEventQueue_JobQueue because the maximum (128) has been reached.

Environment

All Tanzu GemFire supported versions

Cause

GemFire enforces a hard limit of 128 for the combined total of GatewaySenders and AsyncEventQueues per cluster. This means no more than 128 of these queues can exist across the entire cluster. There is no supported configuration or product option to increase this limit—it is enforced by the core product itself.

  • The 128-queue maximum per cluster is a non-configurable, hard product limit.
  • Any attempt to create more than 128 GatewaySenders or AsyncEventQueues in the same cluster will result in the above error.
  • This cap applies to the sum of all GatewaySenders and AsyncEventQueues, not separately (e.g., 64 senders + 64 queues = 128 total).
  • "Per cluster" means the total number across all members in the cluster, not per server, member, or VM.
  • There is no officially supported mechanism, product configuration, or property to exceed the 128 limit.

Resolution

Workarounds and Best Practices:

  • Consolidate usage:
    Multiple regions can share the same AsyncEventQueue or GatewaySender if the same event handling logic applies. You do this by configuring several regions to use the same queue and/or sender instance.
  • AsyncEventListener design:
    If you share a queue among multiple regions, ensure your AsyncEventListener implementation can distinguish and handle events for each region as needed.
  • Application change impact:
    Combining regions or listeners may require application code changes to direct events appropriately and maintain data integrity across shared event handling paths.

Additional Information