Getting Started
This page gives you the 10-minute tour of DREX-M.
After reading it you should know — at a high level — how messages flow, what Headers you need to set, and what to do next to get your Adapter up and running.
What Is DREX-M and Why Use It?
DREX-M (Data Remote EXchange for Messages) is the service-bus layer of the Common Core Platform.
It provides:
Feature | What It Means for You
Single Exchange API | All messages (direct or broadcast) are published to e.cc.drex.portal; no per-topic configuration headaches.
Auto-Provisioned Queues | When you register your adapter, Drex spins up dedicated inbox queues for direct, broadcast, and optional feedback traffic.
Tier-Aware Routing | You specify where the message should go (vessel, central, or cloud) with headers; Drex handles the hops.
Feedback on Delivery Issues | Opt-in feedback queue tells you immediately if a target app is not registered, can't receive your message, or rejected it.
Language Agnostic | Any AMQP 0-9-1 client (Java, .NET, Python, Node, etc.) works. We also ship helper libraries for .NET Standard 2.1 and Java 8.
If you have ever used plain RabbitMQ or a cloud queue service, consider Drex a set of conventions and tooling layered on top to give cross-tier routing, security, and observability.
Tiers and Terminology
Term | What It Represents | Key Points
Site | A vessel or branch office that runs in partially – connected mode. | • Has its own RabbitMQ instance. • Talks only to its designated Central.
Central | The hub for one customer deployment (often hosted in Azure). | • Source of truth for conflict resolution. • Exposes AMQPS endpoint for Site shovels and Cloud consumers.
Cloud | ABS Wavesight multitenant environment. | • Provides SaaS analytics and cross-customer services.
Adapter | A customer or product-team application that sends/receives Drex messages. | • Identified by a unique name (lower-case letters, digits, ., _).
Exchange | e.cc.drex.portal | • Type x-delayed-message with fan-out semantics. • The only exchange you publish to.
Inbox Queues | Auto-created per adapter. | • Direct: q.cc.drex.inbox.direct.adapter.<app> • Broadcast: q.cc.drex.inbox.broadcast.adapter.<app> • Feedback: q.cc.drex.inbox.feedback.adapter.<app>
Quick Checklist for New Adapters
Pick an Adapter Name
Lower-case, digits, ., -, or _, e.g. fleet.analytics.
Max length: 150 carecter.
Register the Adapter
Drop a JSON file in: C:\abs\config\drex-shared\adapters\<app>.json
Example:
{
"Name": "fleet.analytics",
"Ver": "1.0.0",
"Direct": { "Enable": true, "EnableFeedback": true },
"Broadcast":{ "Enable": true, "Topics": ["fleet.#"] }
}
Item | Value / Action
Username | Exactly the adapter name you registered (e.g. fleet.analytics).
Password | Request it from the Common Core team.
Obtain Credentials & Verify Connectivity
// Minimal connectivity test (Service Bus library)
RmqConnection connection = new()
{
ConnectionParams = new RmqConnectionParams
{
ConnectionString = "amqps://fleet.analytics:your_password@rabbitmq-central:5671/commoncore"
//ConnectionString = "amqp://fleet.analytics:your_password@rabbitmq-vessel:5672/commoncore"
},
InputMarshaller = new RmqInputMessageMarshaller(),
OutputMarshaller = new RmqOutputMessageMarshaller()
};
---
await connection.StartAsync();
await Console.Out.WriteLineAsync("Connected to Drex RabbitMQ.");
If no exception is thrown, your credentials and network path are valid.
class SimpleProcessor : Processor
{
public override async Task Process(Message message)
{
await Console.Out.WriteLineAsync(
$"Received message from '{message.Header.SourceApp?.Name ?? "anonymous"}' app");
// Handle the message
}
}
await using SimpleProcessor processor = new();
RmqSourceParams queueParams = new()
{
SourceConnectionType = RmqConnectionType.QUEUE,
SourceQueueOrExchange = "q.cc.drex.inbox.direct.adapter.fleet.analytics"
};
var listener = await Connection.NewListenerAsync("direct-listener", queueParams, processor);
await listener.StartAsync();
Listen for a message
The listener now waits on your direct-inbox queue.
Build and publish a message
MessagePopulator messagePopulator = new()
{
SourceSite = new Site(null, SiteType.CENTRAL),
SourceApp = new Application(null, "fleet.analytics"),
TargetSite = new Site(null, SiteType.CENTRAL),
TargetApp = new Application(null, "maintenance.scheduler"),
TimeToLive = TimeSpan.FromSeconds(60),
Scope = Scope.LINEAR // LINEAR, REQUEST, BROADCAST, etc.
};
var body = Encoding.UTF8.GetBytes("hello world");
Message message = new();
message.BodyBuffer = new ReadOnlyMemory<byte>(messageBody);
messagePopulator.Initialize(message);
RmqTargetParams targetParameters = new()
{
TargetConnectionType = RmqConnectionType.EXCHANGE,
TargetQueueOrExchange = "e.cc.drex.portal"
};
var publisher = connection.NewPublisher("portal-publisher", targetParams);
await publisher.PublishAsync(message);
await Console.Out.WriteLineAsync("Message published");
Congratulations—your adapter can now:
Authenticate to Drex
Consume messages from its inbox
Publish messages to any other adapter via e.cc.drex.portal