Element <rabbitmq-importer>¶
Purpose: Declare a RabbitMQ consumer source used by DataMimic statements.
Why: Use it as a bounded RabbitMQ queue source with explicit acknowledgement semantics.
Example¶
1 | |
Decision guide¶
Business value: Consumes available RabbitMQ messages as a bounded, acknowledged source.
-
Use when
- A model processes up to an explicit count of currently available queue messages.
-
Choose another approach when
- The requirement is continuous consumption or deterministic global order across competing consumers.
-
Prerequisites
- Provide broker and queue connectivity and an explicit count on the consuming statement.
-
Alternatives
- Use kafka-importer when replayable topic offsets are required. (See:
<kafka-importer>)
- Use kafka-importer when replayable topic offsets are required. (See:
Complete examples¶
Consume a bounded queue and publish confirmed messages
Use a count-bounded importer for available queue messages and a separate confirmed exporter route; keep durable topology broker-managed and credentials secret-backed by default.
| rabbitmq-roundtrip/datamimic.xml | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |
Rules and invalid combinations¶
I929 β Source RabbitMQ Client Missing
RabbitMQ source requested but client was None
Why: RabbitMQ source loading requires a configured RabbitMQ importer client instance.
Resolution: Provide a valid RabbitMQ importer client and retry.
I930 β Generate Offset Unsupported for RabbitMQ
Why: The offset attribute cannot be used with RabbitMQ sources; it only applies to file-based sources.
Resolution: Remove the offset attribute, or use a file source instead of RabbitMQ.
I931 β Source RabbitMQ Client Unsupported API
RabbitMQ client '{client_type}' must implement consume_iter_message(count)
Why: The configured RabbitMQ client does not implement the required consume API contract.
Resolution: Use a RabbitMQ importer client that implements consume_iter_message.
I932 β Source RabbitMQ TLS Failed
RabbitMQ TLS/SSL handshake failed for queue '{queue}': {reason}
Why: The RabbitMQ importer failed the TLS/SSL handshake while reading messages.
Resolution: Verify RabbitMQ certificates, trust chain, hostname validation, and TLS settings.
I933 β Source RabbitMQ Authentication Failed
RabbitMQ authentication failed for queue '{queue}': {reason}
Why: The RabbitMQ importer could not authenticate with the configured credentials.
Resolution: Verify the RabbitMQ user and password for the importer connection.
I934 β Source RabbitMQ Authorization Failed
RabbitMQ authorization failed for queue '{queue}': {reason}
Why: The RabbitMQ importer is authenticated but lacks permission to read the queue.
Resolution: Grant the configured user read access to the virtual host and queue.
I935 β Source RabbitMQ Network Failed
RabbitMQ network connectivity failed for queue '{queue}': {reason}
Why: The RabbitMQ importer could not reach the configured broker endpoint.
Resolution: Verify RabbitMQ host, port, DNS, routing, and firewall connectivity.
I936 β Source RabbitMQ Timeout
RabbitMQ read timed out for queue '{queue}': {reason}
Why: The RabbitMQ source operation exceeded its timeout while reading messages.
Resolution: Retry the operation or tune RabbitMQ connection and heartbeat timeout settings.
I937 β Source RabbitMQ Queue Not Found
RabbitMQ queue '{queue}' not found or inaccessible: {reason}
Why: The configured RabbitMQ queue does not exist or cannot be accessed by the importer.
Resolution: Verify the queue exists and the configured user can access it.
I938 β Source RabbitMQ Read Failed
RabbitMQ source read failed for queue '{queue}': {reason}
Why: The RabbitMQ importer encountered an unclassified failure while reading messages.
Resolution: Inspect RabbitMQ broker/client logs and importer configuration, then retry.
I947 β Source RabbitMQ Option Unsupported
RabbitMQ source '{source}' does not support {option}={value}. Supported behavior: {supported}.
Why: The requested source-selection option cannot be preserved by bounded RabbitMQ queue consumption.
Resolution: Remove the unsupported option or use one of the listed RabbitMQ source behaviors.
Allowed parents / Allowed children¶
Allowed parents: else, else-if, if, setup, while
Allowed children:
None
Related concepts and use cases¶
- Choose a source and target β Guides users and agents from an input ownership boundary and intended side effect to one bounded source and target contract.
- Determinism, parallelism, paging, and distribution β Separates seed, distribution, worker policy, paging, and streaming so topology choices do not become false determinism claims.
- RabbitMQ bounded source and target β Explains bounded RabbitMQ consumption, competing-consumer ordering, broker-owned topology, publisher confirms, and unsupported finite-pool options.
Attributes¶
Show all 25 attributes
allow_auto_declare_queue
Declare the configured RabbitMQ queue when the client first uses it.
optional; boolean; Default: false.
auto_ack
Acknowledge each message automatically when RabbitMQ delivers it.
optional; boolean; Default: false.
auto_delete
Delete the declared queue after its last consumer disconnects.
optional; boolean; Default: false.
blocked_connection_timeout
Maximum seconds to wait while RabbitMQ blocks the connection.
optional; integer; Default: null.
connection_attempts
Number of AMQP connection attempts before reporting failure.
optional; integer; Default: null.
environment
Environment label for this RabbitMQ configuration.
optional; string; Default: null.
exclusive
Restrict the declared queue to this connection.
optional; boolean; Default: false.
heartbeat
AMQP heartbeat interval in seconds.
optional; integer; Default: null.
host
RabbitMQ broker hostname or IP address.
optional; string.
id
RabbitMQ importer identifier.
required; string.
password
Password used for RabbitMQ authentication.
optional; string; Default: "".
port
RabbitMQ AMQP port.
optional; integer.
prefetch_count
Maximum unacknowledged messages delivered to this consumer.
optional; integer; Default: null.
queue
Queue from which the importer consumes messages.
required; string.
queue_expires_ms
Delete the declared queue after this many unused milliseconds.
optional; integer; Default: null.
retry_delay
Seconds to wait between RabbitMQ connection attempts.
optional; integer; Default: null.
ssl_cafile
Path to the CA certificate file used to verify RabbitMQ.
optional; string; Default: null.
ssl_certfile
Path to the client TLS certificate file.
optional; string; Default: null.
ssl_check_hostname
Verify that the broker certificate matches the requested hostname.
optional; boolean; Default: null.
ssl_enabled
Enable TLS for the RabbitMQ connection.
optional; boolean; Default: null.
ssl_keyfile
Path to the client TLS private-key file.
optional; string; Default: null.
ssl_keyfile_password
Password used to decrypt the client TLS private key.
optional; string; Default: null.
system
System identifier for this RabbitMQ configuration.
optional; string; Default: null.
user
User used for RabbitMQ authentication.
optional; string.
virtual_host
RabbitMQ virtual host containing the queue or exchange.
optional; string; Default: "/".