If you are implementing a processor in a language other than C# (e.g., Python, Go, Node.js) and cannot use the MassTransit SDK, Backpack provides a Raw Ingestion path. This allows you to interact with the system using standard JSON messages over RabbitMQ.
Standard .NET processors use binary-wrapped MassTransit messages. Raw processors use plain JSON:
- Request: The Gateway sends an
ArtifactProcessRequestto your queue (e.g.,processor-python-ecosystem). - Processing: Your service parses the metadata.
- Reply: Instead of replying to the standard ingest queue, you send a raw JSON
Artifactobject to thegateway-ingest-processed-rawqueue.
Your service should listen on a queue named processor-<your-name>.
Because the Gateway is written in .NET, the incoming message will be wrapped in a MassTransit JSON Envelope. You must parse the message field to get the actual payload.
{
"messageId": "08db0000-5c70-0005-0123-08db23456789",
"correlationId": "08db0000-5c70-0005-9876-08db23456789",
"conversationId": "08db0000-5c70-0005-abcd-08db23456789",
"sourceAddress": "rabbitmq://localhost/gateway",
"destinationAddress": "rabbitmq://localhost/processor-python-ecosystem",
"messageType": [
"urn:message:Core.Kernel.Messages:ArtifactProcessRequest"
],
"message": {
"artifact": {
"id": "my-package",
"processor": "python-ecosystem",
"filter": ".*",
"config": {}
},
"ctx": "CORRELATION_TOKEN_12345"
},
"sentTime": "2023-10-27T10:00:00.000Z",
"headers": {},
"host": {
"machineName": "BACKPACK-GATEWAY",
"processName": "Core.Gateway",
"processId": 1234,
"assembly": "Core.Gateway",
"assemblyVersion": "1.0.0.0",
"frameworkVersion": "8.0.0",
"massTransitVersion": "8.1.0",
"operatingSystemVersion": "Unix 13.0.0"
}
}message.artifact: The skeleton artifact object (id, processor, config).message.ctx: A correlation context string. Crucial: You must include this exact string in your reply so the Gateway can track the recursive discovery chain.
Once processing is complete, publish a JSON message to the gateway-ingest-processed-raw exchange/queue.
The message must be a JSON object with two top-level fields:
{
"context": "the-ctx-string-from-the-request",
"artifact": {
"id": "my-package",
"processor": "python-ecosystem",
"versions": {
"1.0.0": {
"version": "1.0.0",
"files": {
"package.zip": {
"uri": "https://upstream.com/package.zip",
"folder": "optional-subfolder"
}
}
}
},
"dependencies": [
{
"id": "required-lib",
"processor": "python-ecosystem"
}
]
}
}The gateway-ingest-processed-raw endpoint in the Gateway is configured with UseRawJsonDeserializer. This tells MassTransit to skip its own envelope headers and security checks and simply parse the body as a direct mapping to the Artifact class.
- Configure your RabbitMQ client to use Plain JSON (no MassTransit headers).
- Listen on
processor-<name>. - Extract the
ctxfield from the incoming message. - Perform your logic.
- Publish the result to
gateway-ingest-processed-raw. - Ensure the
contextfield in your reply matches thectxfrom the request.