Event Gateways - Settings

Configure global event gateway settings and resource allocation

Overview

Event Gateway Settings control the global configuration and resource allocation for all event gateways in ColdFusion. These settings determine how ColdFusion manages event processing threads, message queuing, and overall gateway performance.

The Settings page has four controls: Enable ColdFusion Event Gateway Services, Event Gateway Processing Threads, Maximum Number of Events to Queue, and the Start SMS Test Server button. Startup timeouts are configured per gateway type on the Gateway Types page, not here.

Gateway Service Settings

Core settings that control event gateway service behavior.

Enable Event Gateway Services

PurposeMaster switch to enable or disable all event gateways. Changing this setting restarts the event gateway service.
DefaultDisabled (verified in the ColdFusion 2025 Update 14 configuration, neo-event.xml, key ENABLEEVENTGATEWAYSERVICE, shipped in Adobe's official Docker image)
ImpactWhen disabled, no event gateways will start, even if configured with automatic startup
RecommendationEnable only if you are using event gateways
Performance: If you are not using event gateways, leave this disabled to reduce server resource consumption and startup time.

Start SMS Test Server

PurposeStarts the built-in SMS test server so you can test SMS gateway applications without a carrier connection
RecommendationUse in development only

Thread Pool Configuration

Control the number of threads available for event processing across all gateways.

Event Gateway Processing Threads

PurposeMaximum number of threads used to execute ColdFusion functions when an event arrives. More threads use more resources but increase event throughput.
Edition LimitsStandard Edition enables only the CFML (asynchronous), DirectoryWatcher, Socket, and user-written gateways; Enterprise supports all gateway types
ScopeShared across all gateway instances
RecommendationLow volume: 10-25 threads
Medium volume: 50-100 threads
High volume: 100-200+ threads
Tuning Guidelines:
  • Monitor thread usage under typical load
  • Increase if events are queuing excessively
  • Consider number of active gateways and expected concurrent events
  • Balance with available CPU cores and memory
  • Each thread consumes memory (typically 1-2 MB per thread)

Event Queue Settings

Configure how ColdFusion queues and processes gateway events.

Maximum Number of Events to Queue

PurposeMaximum number of events that can be queued across all gateways
BehaviorIf the queue length exceeds this value, new gateway events are not added to the processing queue
RecommendationLow volume: 500-1000
Medium volume: 2000-5000
High volume: 10000+
Memory Impact: Larger queues consume more memory. Each queued event holds message data in memory until processed. Monitor heap usage when increasing queue sizes.
Tuning Strategy:
  • Monitor queue depth under normal and peak loads
  • If queue frequently fills up, increase thread pool first
  • Only increase queue size if events arrive faster than threads can process
  • Very large queues may indicate processing bottlenecks that need optimization

Monitoring Event Gateways

Gateway settings and instance status are available through the Administrator API (cfide.adminapi.eventgateway). The getGatewayHelper(gatewayID) function returns a gateway type's own helper object and does not provide monitoring methods.

Gateway Monitoring with the Admin API
// Log in to the Admin API
createObject("component", "cfide.adminapi.administrator").login(adminPassword);

// List configured gateway instances
eg = createObject("component", "cfide.adminapi.eventgateway");
writeDump(eg.getGatewayInstances());

// Started (true) or stopped (false) for one instance
writeDump(eg.getGatewayInstanceStatus("SMS_Notifications"));

// The two Settings page values
writeOutput(eg.getGatewayProperty("ThreadPoolSize"));
writeOutput(eg.getGatewayProperty("MaxQueueSize"));

// Event counters since server start (EventsIn or EventsOut)
writeOutput(eg.getGatewayEvents("SMS_Notifications", "EventsIn"));

Performance Tuning Recommendations

Low Volume (< 100 events/min)

Thread Pool
10-25 threads
Queue Size
500-1000 events

Conservative settings for occasional event processing with minimal resource overhead.

Medium Volume (100-1000 events/min)

Thread Pool
50-100 threads
Queue Size
2000-5000 events

Balanced configuration for steady event processing with room for traffic spikes.

High Volume (> 1000 events/min)

Thread Pool
100-200+ threads
Queue Size
10000+ events

Aggressive settings for high-throughput scenarios. Monitor memory and CPU carefully.

General Tuning Strategy:
  • Start with conservative settings and increase based on monitoring
  • Confirm your edition supports the gateway types you plan to use
  • Monitor thread pool utilization and queue depth under load
  • Increase threads before increasing queue size
  • Optimize CFC event handlers for fast processing
  • Consider dedicated ColdFusion instances for high-volume gateways
  • Use external message queuing (RabbitMQ, Kafka) for very high volumes

Common Issues & Solutions

Events Being Dropped

Symptom: Gateway events are not reaching CFC handlers, messages appear to be lost
Solutions:
  • Check if event queue is full (increase queue size or thread pool)
  • Monitor thread pool utilization (increase threads if maxed out)
  • Review CFC handler logs for errors during processing
  • Verify Event Gateway Services are enabled
  • Check gateway instance is running and not failed
  • Review eventgateway.log for errors

High Memory Usage

Symptom: ColdFusion memory usage increases significantly when event gateways are active
Solutions:
  • Reduce thread pool size if over-allocated
  • Decrease queue size to reduce queued event memory
  • Optimize CFC handlers to release resources promptly
  • Check for memory leaks in custom gateway Java code
  • Increase JVM heap size if genuinely needed for workload

Slow Event Processing

Symptom: Events are processed slowly, queue depth steadily increases
Solutions:
  • Increase thread pool size to process events faster
  • Optimize CFC handler performance (database queries, external calls)
  • Implement asynchronous processing for slow operations
  • Check for thread contention or database bottlenecks
  • Consider horizontal scaling (multiple CF instances)

Related Resources

Event Gateways - Settings | ColdFusion Administrator | CFGuide