Overview

Points within RabbitMQ AMQP DataSource generate data based on the received messages from RabbitMQ queue

Attributes common to all AMQP data point are:

Exchanges

Exchange is an AMQP entitle which define how to route the message into zero or more queues. This procedure divers within various exchange types. Each exchange has separate attributes like: Name, Durability or Auto-delete. Durable exchange survive broker restart, but Transient do not - they have to be redeclared when broker comes back online. Below are described different exchange types with example usage and configuration.

Default Exchange ("Empty")

About:

This is a kind of direct exchange with empty name of it. It used the default exchange declared by the broker. It is very simple to define that exchange - very useful for non-complex implementations. Is has queues which are bound to it with the routing key that match queue name

Usage example:

Receive temperature data from your Raspberry PI

Configuration:

Assume that your PI sends every five seconds simple numeric data from a temperature sensor to your RabbitMQ broker to default exchange (name = "") to queue called "Living_room_temperature".

Assume also that you have pre-configured DataSource with filled IP Address, port and Virtual Host fields

  1. Create a new Data Point with name "Temperature LivingRoom sensor"
  2. Select data type as "Numeric" - because PI sends simple numeric values
  3. Select exchange type as "Empty" - use simplest option to create data point
  4. Enter a rabbitMQ Queue Name "Living_room_temperature" (the same on which Raspberry sends a messages)
  5. Select Queue Durability to "Durable" and Ack Mode to "No ACK" (make sure that your queue in broker is also durable)
  6. Save Data Point and enable it and enable Data Source
  7. Open watch list to see incoming values from your device

Direct Exchange

About:

This type of exchanges delivers messages to queues according to the message routing key.

Usage example:

Receive messages from different news feeds

Configuration:

Assume that RabbitMQ broker receive from different sources (like "sport", "events", "music") messages data with latest news from the world to exchange called "news". We can also receive the same messages kind on the other exchange called "local_news".

  1. Create first Data Point with name "WorldNews - sport"
  2. Select data type as "Alphanumeric"
  3. Select exchange type as "Direct"
  4. Enter a RabbitMQ Exchange Name "news"
  5. Enter a routing key "sport" - which kind of messages we want to receive.
  6. Select Queue Durability to "Durable" and Ack Mode to "No ACK" (make sure that your queue in broker is also durable)
  7. Save Data Point
  8. Create second Data Point with name "WorldNews - events" and repeat steps (2, 3 and 4)
  9. Enter a routing key "events"
  10. Save Data Point and enable all than enable Data Source
  11. Open watch list to see incoming values from your device

Topic Exchange

About:

This type is similar to direct one but has one improvement - pattern matching. This exchange can route the messages based on matching routing key and the pattern that was used to bind a queue to an exchange. It has a board set of use cases form distributing relevant data to specific geographic location, stock price updates, logging routing and much more.

Usage example:

Receive specific logs from production environment

Configuration:

Assume that RabbitMQ broker receive data from different applications in different levels of log to exchange called "apps_logs".

  1. Create first Data Point with name "ScadaLTS info"
  2. Select data type as "Alphanumeric"
  3. Select exchange type as "Topic"
  4. Enter a RabbitMQ Exchange Name "apps_logs"
  5. Enter a routing key "scada.info" - which kind of messages we want to receive.
  6. Select Queue Durability to "Durable" and Ack Mode to "No ACK" (make sure that your queue in broker is also durable)
  7. Save Data Point
  8. Create second Data Point with name "ScadaDashboard - all" and repeat steps (2, 3 and 4)
  9. Enter a routing key "scada_dashboard.*"
  10. Save Data Point
  11. Create third Data Point with name "all logs" and repeat steps (2, 3 and 4)
  12. Enter a routing key "#"
  13. Save Data Point and enable all than enable Data Source
  14. Open watch list to see incoming values from your device

Fanout Exchange

About:

This exchange type is similar to IP broadcast behaviour. Based on the exchange name we receive all data from this exchange. This exchange routes messages to all of the queues that are bound to it and the routing key is ignored.