Available Transports
Infinitic supports two transport implementations:- Pulsar - Production-ready distributed messaging (recommended)
- InMemory - Local development and testing
Pulsar Transport
Apache Pulsar is the recommended transport for production deployments.YAML Configuration
Basic Configuration
Complete Configuration
Builder Pattern
Configuration Options
Core Settings
| Option | Type | Required | Description |
|---|---|---|---|
brokerServiceUrl | String | Yes | Pulsar broker URL (e.g., pulsar://localhost:6650) |
webServiceUrl | String | Yes | Pulsar web service URL (e.g., http://localhost:8080) |
tenant | String | Yes | Pulsar tenant name |
namespace | String | Yes | Pulsar namespace name |
shutdownGracePeriodSeconds | Double | No | Graceful shutdown duration (default: 30.0) |
allowedClusters | Set<String> | No | Allowed Pulsar clusters |
adminRoles | Set<String> | No | Admin role names |
Client Settings
| Option | Type | Default | Description |
|---|---|---|---|
operationTimeout | Integer | 30 | Operation timeout in seconds |
connectionTimeout | Integer | 10 | Connection timeout in seconds |
requestTimeout | Integer | 60 | Request timeout in seconds |
keepAliveInterval | Integer | 30 | Keep-alive interval in seconds |
authPluginClassName | String | null | Authentication plugin class |
authParams | String | null | Authentication parameters |
Producer Settings
| Option | Type | Default | Description |
|---|---|---|---|
compressionType | String | NONE | Compression type (NONE, LZ4, ZLIB, ZSTD, SNAPPY) |
batchingMaxMessages | Integer | 1000 | Maximum messages per batch |
batchingMaxPublishDelay | Integer | 10 | Maximum batch delay in milliseconds |
sendTimeout | Integer | 30 | Send timeout in seconds |
Consumer Settings
| Option | Type | Default | Description |
|---|---|---|---|
receiverQueueSize | Integer | 1000 | Receiver queue size |
acknowledgmentGroupTime | Integer | 100 | Acknowledgment group time in milliseconds |
subscriptionType | String | Shared | Subscription type (Shared, Exclusive, Failover, Key_Shared) |
Authentication
Token Authentication
TLS Authentication
Connection Pooling
Pulsar clients maintain connection pools automatically. Configure pool behavior:Performance Tuning
High Throughput
Low Latency
InMemory Transport
The InMemory transport is ideal for local development, testing, and single-process applications.YAML Configuration
Programmatic Configuration
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
shutdownGracePeriodSeconds | Double | 5.0 | Graceful shutdown duration in seconds |
Use Cases
Unit Testing
Local Development
Shutdown Grace Period
The shutdown grace period determines how long the system waits to complete in-flight messages before shutting down.Configuration
Behavior
-
During shutdown, the transport:
- Stops accepting new messages
- Allows existing messages to complete
- Waits up to
shutdownGracePeriodSeconds - Forces shutdown if grace period expires
-
Recommended values:
- Development: 5-10 seconds
- Production: 30-60 seconds
- Long-running tasks: 60+ seconds
Best Practices
Production Deployments
- Use Pulsar transport - InMemory is not suitable for production
- Enable authentication - Always use authentication in production
- Configure TLS - Encrypt connections with TLS
- Set appropriate timeouts - Balance between reliability and latency
- Monitor connections - Track connection health and pool usage
Development Environments
- Use InMemory for tests - Simplifies test setup and teardown
- Use Pulsar for integration - Test with production-like setup
- Short grace periods - Faster feedback in development
High Availability
Troubleshooting
Connection Issues
Performance Issues
Authentication Errors
See Also
- Worker Configuration - Configure workers
- Client Configuration - Configure clients
- Storage Configuration - Configure state storage