Dynamic Deliveries and Subscriptions

Modified on Thu, 17 Jul at 5:58 PM

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.

  1. Use the API to create a delivery with a selector
  2. Authenticate with your actor's client certificate
  3. API returns delivery ID and AMQP connection details

Selector Examples:

  • messageType = 'CAM' - All CAM capabilities
  • messageType = '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.

  1. Use the API to create a subscription with a selector
  2. Authenticate with your actor's client certificate
  3. 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

  1. Create endpoints via API (deliveries for publishing, subscriptions for consuming)
  2. Extract connection details from API responses
  3. Establish AMQP connections using the provided host, port, and target/source
  4. Start data exchange (publish or consume messages)

Complete Implementation Examples


Message Format

Required AMQP Application Properties

PropertyExample
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

  1. Open TLEX Interchange Dashboard > Message Metrics
  2. Verify increasing message counts and active endpoint status
  3. Check for error indicators
  4. Use API endpoints to programmatically monitor status

Troubleshooting

IssueSolution
API authentication failedVerify client certificate matches actor certificate
Connection refusedCheck API response for correct host/port details
SSL/TLS handshake failedVerify client cert + key PEM format
SASL EXTERNAL failedEnsure actor CN matches certificate subject
Authorization deniedCheck actor has policy access to capability
Selector not matchingEnsure capabilities exist matching selector criteria
Endpoint not foundVerify 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

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article