Your webhook delay issue requires a multi-faceted solution addressing event queue configuration, subscription priority handling, and implementing a robust polling fallback mechanism.
Event Queue Configuration:
The primary cause of your 5-10 minute delays is the default event batching and queue processing configuration. Modify these critical properties in wt.properties:
wt.events.batchInterval=30000
wt.events.publisherThreads=10
wt.events.queueSize=2000
wt.events.maxRetries=3
The batchInterval controls how frequently queued events are processed. The default 300000ms (5 minutes) explains your delay pattern. Setting it to 30000ms (30 seconds) provides near-real-time delivery while still allowing efficient batching.
Event Subscription Priority:
While subscription priority doesn’t affect timing directly, it determines processing order within a batch. For critical ECO events, use a multi-tier subscription strategy:
// Pseudocode - Key implementation steps:
1. Create HIGH priority subscription for critical state changes (Released, Approved)
2. Create NORMAL priority subscription for informational events (In Review, etc.)
3. Configure separate webhook endpoints per priority level
4. Implement priority-aware processing in receiving system
5. Monitor queue depth metrics per priority tier
// See documentation: Event Management API Section 7.4
Webhook Retry Policy:
The default retry policy can introduce cascading delays if your webhook endpoint is slow or unreliable. Configure aggressive timeouts and limited retries:
POST /Windchill/servlet/odata/v2/EventSubscriptions
{
"eventType": "ECO.StateChanged",
"webhookUrl": "https://your-system.com/eco-webhook",
"priority": "HIGH",
"timeout": 5000,
"maxRetries": 2,
"retryBackoff": "FIXED"
}
Use a short timeout (5 seconds) and minimal retries (2 attempts). Handle additional retry logic in your receiving system where you have better control and visibility.
Polling Fallback Mechanism:
Even with optimized webhook configuration, implement polling as a safety net for critical workflows. Here’s an effective hybrid approach:
// Hybrid event strategy:
1. Primary: Webhook delivers ~95% of events within 30-60 seconds
2. Fallback: Poll every 90 seconds for events from last 5 minutes
3. Deduplication: Track received event IDs to avoid processing duplicates
4. Gap detection: Alert if polling finds events webhook missed
Query for recent ECO changes:
GET /Windchill/servlet/odata/v2/PTC/ChangeOrders?
$filter=modifiedAfter eq '2025-06-11T16:30:00Z' and
state eq 'RELEASED'
Advanced Configuration:
For high-volume scenarios, consider these additional optimizations:
- Event Filtering: Subscribe only to specific ECO types or states to reduce queue volume
- Dedicated Method Server: Run a dedicated method server instance for event publishing to isolate from other workloads
- Queue Monitoring: Implement alerting on queue depth and processing lag
- Connection Pooling: Use persistent HTTP connections for webhook delivery to reduce overhead
Webhook Endpoint Best Practices:
Optimize your receiving endpoint to minimize processing time:
- Respond immediately with 200 OK (within 1 second)
- Queue incoming events for asynchronous processing
- Use idempotency keys to handle duplicate deliveries
- Implement health check endpoint for Windchill to verify availability
Monitoring and Diagnostics:
Track these metrics to maintain optimal performance:
// Key metrics to monitor:
- Event queue depth (target: <100 events)
- Average delivery latency (target: <60 seconds)
- Webhook success rate (target: >98%)
- Polling gap detection rate (target: <2%)
Enable detailed event logging:
<Logger name="wt.events" level="DEBUG"/>
<Logger name="wt.webhooks" level="INFO"/>
Implementation Roadmap:
- Update wt.properties with optimized queue configuration (requires restart)
- Modify webhook subscriptions with new timeout and retry settings
- Implement polling fallback with 90-second interval
- Deploy webhook endpoint optimizations
- Monitor for 48 hours and tune based on actual metrics
With these changes, you should achieve sub-60-second webhook delivery for 95%+ of events, with polling catching any gaps. The combination provides the real-time responsiveness your automation requires while maintaining reliability through redundancy.
This draft is based on general Windchill knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.