Documentation Index

Fetch the complete documentation index at: https://navigator.apprentice.io/llms.txt

Use this file to discover all available pages before exploring further.

Event Queue Endpoint - RabbitMQ

Prev Next
This content is currently unavailable in Ja - 日本語. You are viewing the default (English) version.

Tempo RabbitMQ Integration — Outbound Publishing

Overview

Tempo can publish platform events to a RabbitMQ broker. For this transport, Apprentice provides and hosts the RabbitMQ broker; you (the partner) connect to it as a consumer. Tempo acts as an AMQP publishing client into our broker — it opens a connection, publishes to an exchange, and closes the connection. We provide the broker endpoint, credentials, exchanges, and the routing keys; you bind your own queue(s) and consume the events.

RabbitMQ is one of three outbound transports Tempo supports (MQTT, RabbitMQ, REST); this document covers RabbitMQ only.

Connection & Authentication

Aspect Value
Protocol AMQP 0-9-1 (amqplib)
Role Apprentice hosts the broker; Tempo publishes into it and you consume from it
URI amqps://{username}:{password}@{host[:port][/vhost]}
TLS On by default (amqps://). Plaintext (amqp://) is only used when SSL is explicitly disabled
Authentication Username + password
Connection model Connect → open channel → publish one message → close channel & connection, per event

Apprentice provides you the broker host (and vhost/port) plus consumer credentials. You connect to that endpoint and consume from a queue bound to the routing keys you care about.

Exchange & routing key

RabbitMQ has no "topic string" the way MQTT does. Instead, each event is published to an exchange named after the event type, with a routing key equal to the event trigger. Unlike MQTT, these values are not lowercased or underscore-normalized — they are the raw type/trigger values.

exchange     = {event_type}      e.g. "Batch"
routing key  = {event_trigger}   e.g. "batch_run_status"

Concrete exchanges & routing keys

Domain Exchange Routing key
Batch run status Batch batch_run_status
Procedure run state Procedure Run procedure_run_state
Procedure step execution Procedure Run step_execution
Material inventory movement Material Inventory material_inventory_movement
Custom event (deprecated) Custom Event custom_event
Exception sync Exception exception_sync
Printing — material sublot Printing printing_material_sublot
Printing — dispense Printing printing_dispense
Printing — material output (primary) Printing printing_material_output_primary
Printing — material output (by-product) Printing printing_material_output_bi_product
Printing — material output (intermediate) Printing printing_material_output_intermediate
Printing — equipment Printing printing_equipment
Printing — create kit Printing printing_create_kit
Printing — sample Printing printing_sample
Printing — load array Printing printing_load_array
Printing — create label Printing printing_create_label

The exchanges live on the Apprentice-hosted broker. To receive events, you bind a queue to the relevant exchange/routing keys and consume from it. Which events are published depends on the event configurations enabled for your integration.

Message format

The message body is the event's JSON object (UTF-8), specific to the event type.

The message is published with these AMQP properties:

Property Value
contentType application/json
contentEncoding utf-8
timestamp publish time (epoch ms)
appId Apprentice
headers event metadata (see below)

Metadata (AMQP headers)

For RabbitMQ, event metadata is always included, delivered as AMQP message headers (not merged into the body):

OrganizationID:    …
OrganizationName:  …
OrganizationURL:   …
EventType:         Batch
EventTrigger:      batch_run_status
Subscriber:        <your endpoint name>
CreatedBy:         <user email or 'System Auto Execution'>
SourceEnvironment: <environment>
CreationDateTime:  2026-06-18T00:00:00.000Z

What Apprentice provides vs. what you do

Apprentice provides:

  • The RabbitMQ broker (hosted by us), reachable over TLS (amqps)
  • The broker host (and vhost/port) and consumer credentials
  • The exchanges and the routing keys listed above

You (the partner) do:

  • Connect to the Apprentice-hosted broker with the provided credentials
  • Declare/bind a queue to the exchange(s) and routing keys for the events you want
  • Consume and acknowledge messages from that queue

Caveats

  • Auth is username/password only.
  • Exchange and routing-key names are the raw event type/trigger values (note capitalization and spaces, e.g. Procedure Run).
  • Metadata is delivered in AMQP headers, not the message body.