Dynamic Deliveries and Subscriptions
Time: 20-40 minutes | Goal: Set up dynamic AMQP 1.0 endpoints programmatically via API for publishing and consuming data
Prerequisites
- Completed Quick Start Guide (actor, capability, policies configured)
- Certificate bundle downloaded and extracted
Overview
Dynamic endpoints are created and managed programmatically via API calls, providing scalable and resilient AMQP 1.0 connections with automatic lifecycle management.
Best for: Production, high volumes, multiple endpoints, high-availability scenarios
Advantages: Scalable, resilient, programmatic control, automatic failover
Creating Dynamic Deliveries (Publishing)
Dynamic deliveries are created via API calls to port 5443 and automatically provision AMQP endpoints.
- Use the API to create a delivery with a selector
- Authenticate with your actor's client certificate
- API returns delivery ID and AMQP connection details
Selector Examples:
messageType = 'CAM'
- All CAM capabilitiesmessageType = 'CAM' AND publisherId = 'UK12345'
- Specific publisher
Creating Dynamic Subscriptions (Consuming)
Dynamic subscriptions are created via API calls to port 5443 for consuming data from accessible capabilities.
- Use the API to create a subscription with a selector
- Authenticate with your actor's client certificate
- API returns subscription ID and AMQP connection details
Implementation
Implementation involves writing a client that automates the delivery/subscription creation process and then establishes AMQP connections for data exchange.
Required Certificate Files
- Client Certificate + Private Key: Combined PEM file
- CA Certificate: Separate PEM file
Implementation Flow
- Create endpoints via API (deliveries for publishing, subscriptions for consuming)
- Extract connection details from API responses
- Establish AMQP connections using the provided host, port, and target/source
- Start data exchange (publish or consume messages)
Complete Implementation Examples
- Publishing: Dynamic Delivery Example
- Consuming: Dynamic Subscription Example
- API Specification: Complete API Documentation
Message Format
Required AMQP Application Properties
Property | Example |
---|---|
messageType | "CAM" |
publisherId | "UK12345" |
publicationId | "UK12345:DEV_CAM_02" |
originatingCountry | "UK" |
protocolVersion | "CAM:1.4.1" |
quadTree | ",1004," |
Lifecycle Management
Dynamic endpoints can be managed programmatically via the API on port 5443:
- Delete endpoints when no longer needed
- List existing deliveries and subscriptions
- Check endpoint status and health
⚠️ Important: Deliveries and subscriptions must be polled continuously to check for endpoint changes. If not polled regularly, they will be automatically deprovisioned after a certain time.
Monitoring & Verification
- Open TLEX Interchange Dashboard > Message Metrics
- Verify increasing message counts and active endpoint status
- Check for error indicators
- Use API endpoints to programmatically monitor status
Troubleshooting
Issue | Solution |
---|---|
API authentication failed | Verify client certificate matches actor certificate |
Connection refused | Check API response for correct host/port details |
SSL/TLS handshake failed | Verify client cert + key PEM format |
SASL EXTERNAL failed | Ensure actor CN matches certificate subject |
Authorization denied | Check actor has policy access to capability |
Selector not matching | Ensure capabilities exist matching selector criteria |
Endpoint not found | Verify delivery/subscription was created successfully via API |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article