Zum Inhalt

Element <rabbitmq-importer>

Zweck: Deklariert eine RabbitMQ-Consumer-Quelle für DataMimic-Statements.

Warum: Verwende dieses Element als begrenzte RabbitMQ-Queue-Quelle mit expliziter Acknowledgement-Semantik.

Beispiel

1
<rabbitmq-importer id="orders-in" queue="orders.created"/>

Entscheidungshilfe

Fachlicher Nutzen: Konsumiert verfügbare RabbitMQ-Nachrichten als begrenzte, bestätigte Quelle.

  • Verwenden, wenn

    • Wenn ein Modell bis zu einer expliziten Anzahl aktuell verfügbarer Queue-Nachrichten verarbeitet.
  • Anderen Ansatz wählen, wenn

    • Wenn kontinuierlicher Konsum oder globale deterministische Reihenfolge über konkurrierende Consumer verlangt wird.
  • Voraussetzungen

    • Liefere Broker- und Queue-Konnektivität sowie count im konsumierenden Statement.
  • Alternativen

    • Verwende kafka-importer, wenn wiederabspielbare Topic-Offsets erforderlich sind. (Siehe: <kafka-importer>)

Vollständige Beispiele

Eine begrenzte Queue konsumieren und bestätigte Nachrichten veröffentlichen

Verwende einen count-begrenzten Importer für verfügbare Nachrichten und eine getrennte bestätigte Exporter-Route; halte dauerhafte Topologie standardmäßig brokerverwaltet.

rabbitmq-roundtrip/datamimic.xml
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
<setup>
    <rabbitmq-importer id="orders_in"
                       system="rabbit_profile"
                       queue="{rabbitmq_input_queue}"
                       auto_ack="false"
                       prefetch_count="10"/>
    <rabbitmq-exporter id="orders_out"
                       system="rabbit_profile"
                       exchange=""
                       routing_key="{rabbitmq_output_queue}"/>
    <generate name="normalized_orders"
              source="orders_in"
              count="10"
              distribution="ordered"
              target="LogExporter,orders_out"/>
</setup>

Regeln und ungültige Kombinationen

I929 — Source RabbitMQ Client Missing

RabbitMQ source requested but client was None

Warum: RabbitMQ source loading requires a configured RabbitMQ importer client instance.

Lösung: Provide a valid RabbitMQ importer client and retry.

Vollständige Regel

I930 — Generate Offset Unsupported for RabbitMQ

'{stmt_name}': offset= is only supported for file sources, not RabbitMQ source '{source_str}'.

Warum: The offset attribute cannot be used with RabbitMQ sources; it only applies to file-based sources.

Lösung: Remove the offset attribute, or use a file source instead of RabbitMQ.

Vollständige Regel

I931 — Source RabbitMQ Client Unsupported API

RabbitMQ client '{client_type}' must implement consume_iter_message(count)

Warum: The configured RabbitMQ client does not implement the required consume API contract.

Lösung: Use a RabbitMQ importer client that implements consume_iter_message.

Vollständige Regel

I932 — Source RabbitMQ TLS Failed

RabbitMQ TLS/SSL handshake failed for queue '{queue}': {reason}

Warum: The RabbitMQ importer failed the TLS/SSL handshake while reading messages.

Lösung: Verify RabbitMQ certificates, trust chain, hostname validation, and TLS settings.

Vollständige Regel

I933 — Source RabbitMQ Authentication Failed

RabbitMQ authentication failed for queue '{queue}': {reason}

Warum: The RabbitMQ importer could not authenticate with the configured credentials.

Lösung: Verify the RabbitMQ user and password for the importer connection.

Vollständige Regel

I934 — Source RabbitMQ Authorization Failed

RabbitMQ authorization failed for queue '{queue}': {reason}

Warum: The RabbitMQ importer is authenticated but lacks permission to read the queue.

Lösung: Grant the configured user read access to the virtual host and queue.

Vollständige Regel

I935 — Source RabbitMQ Network Failed

RabbitMQ network connectivity failed for queue '{queue}': {reason}

Warum: The RabbitMQ importer could not reach the configured broker endpoint.

Lösung: Verify RabbitMQ host, port, DNS, routing, and firewall connectivity.

Vollständige Regel

I936 — Source RabbitMQ Timeout

RabbitMQ read timed out for queue '{queue}': {reason}

Warum: The RabbitMQ source operation exceeded its timeout while reading messages.

Lösung: Retry the operation or tune RabbitMQ connection and heartbeat timeout settings.

Vollständige Regel

I937 — Source RabbitMQ Queue Not Found

RabbitMQ queue '{queue}' not found or inaccessible: {reason}

Warum: The configured RabbitMQ queue does not exist or cannot be accessed by the importer.

Lösung: Verify the queue exists and the configured user can access it.

Vollständige Regel

I938 — Source RabbitMQ Read Failed

RabbitMQ source read failed for queue '{queue}': {reason}

Warum: The RabbitMQ importer encountered an unclassified failure while reading messages.

Lösung: Inspect RabbitMQ broker/client logs and importer configuration, then retry.

Vollständige Regel

I947 — Source RabbitMQ Option Unsupported

RabbitMQ source '{source}' does not support {option}={value}. Supported behavior: {supported}.

Warum: The requested source-selection option cannot be preserved by bounded RabbitMQ queue consumption.

Lösung: Remove the unsupported option or use one of the listed RabbitMQ source behaviors.

Vollständige Regel

Erlaubte Elternelemente / Erlaubte Kindelemente

Erlaubte Elternelemente: else, else-if, if, setup, while

Erlaubte Kindelemente:

Keine

Attribute

Alle 25 Attribute anzeigen

allow_auto_declare_queue

Declare the configured RabbitMQ queue when the client first uses it.

optional; boolean; Standardwert: false.

auto_ack

Acknowledge each message automatically when RabbitMQ delivers it.

optional; boolean; Standardwert: false.

auto_delete

Delete the declared queue after its last consumer disconnects.

optional; boolean; Standardwert: false.

blocked_connection_timeout

Maximum seconds to wait while RabbitMQ blocks the connection.

optional; integer; Standardwert: null.

connection_attempts

Number of AMQP connection attempts before reporting failure.

optional; integer; Standardwert: null.

environment

Environment label for this RabbitMQ configuration.

optional; string; Standardwert: null.

exclusive

Restrict the declared queue to this connection.

optional; boolean; Standardwert: false.

heartbeat

AMQP heartbeat interval in seconds.

optional; integer; Standardwert: null.

host

RabbitMQ broker hostname or IP address.

optional; string.

id

RabbitMQ importer identifier.

erforderlich; string.

password

Password used for RabbitMQ authentication.

optional; string; Standardwert: "".

port

RabbitMQ AMQP port.

optional; integer.

prefetch_count

Maximum unacknowledged messages delivered to this consumer.

optional; integer; Standardwert: null.

queue

Queue from which the importer consumes messages.

erforderlich; string.

queue_expires_ms

Delete the declared queue after this many unused milliseconds.

optional; integer; Standardwert: null.

retry_delay

Seconds to wait between RabbitMQ connection attempts.

optional; integer; Standardwert: null.

ssl_cafile

Path to the CA certificate file used to verify RabbitMQ.

optional; string; Standardwert: null.

ssl_certfile

Path to the client TLS certificate file.

optional; string; Standardwert: null.

ssl_check_hostname

Verify that the broker certificate matches the requested hostname.

optional; boolean; Standardwert: null.

ssl_enabled

Enable TLS for the RabbitMQ connection.

optional; boolean; Standardwert: null.

ssl_keyfile

Path to the client TLS private-key file.

optional; string; Standardwert: null.

ssl_keyfile_password

Password used to decrypt the client TLS private key.

optional; string; Standardwert: null.

system

System identifier for this RabbitMQ configuration.

optional; string; Standardwert: null.

user

User used for RabbitMQ authentication.

optional; string.

virtual_host

RabbitMQ virtual host containing the queue or exchange.

optional; string; Standardwert: "/".