Access Live RabbitMQ Data in TIBCO Data Virtualization

Jerod Johnson
Jerod Johnson
Director, Technology Evangelism
Use the CData API Driver for Tibco DV to create a RabbitMQ data data source in TIBCO Data Virtualization Studio and gain access to live RabbitMQ data from your TDV Server.

TIBCO Data Virtualization (TDV) is an enterprise data virtualization solution that orchestrates access to multiple and varied data sources. When paired with the CData API Driver for Tibco DV, you get federated access to live RabbitMQ data directly within TIBCO Data Virtualization. This article explains how to deploy an adapter and create a new data source based on RabbitMQ.

With built-in optimized data processing, the CData TIBCO DV Adapter offers unmatched performance for interacting with live RabbitMQ data. When you issue complex SQL queries to RabbitMQ, the adapter pushes supported SQL operations, like filters and aggregations, directly to RabbitMQ. Its built-in dynamic metadata querying allows you to work with and analyze RabbitMQ data using native data types.

Deploy the RabbitMQ TIBCO DV Adapter

  1. In a console, navigate to the bin folder in the TDV Server installation directory. If there is a current version of the adapter installed, you will need to undeploy it.

    .\server_util.bat -server localhost -user admin -password ******** -undeploy -version 1 -name API
    
  2. Extract the CData TIBCO DV Adapter to a local folder and deploy the JAR file (tdv.api.jar) to the server from the extract location.

    .\server_util.bat -server localhost -user admin -password ******** -deploy -package /PATH/TO/tdv.api.jar
    

You may need to restart the server to ensure the new JAR file is loaded properly, which can be accomplished by running the composite.bat script located at: C:\Program Files\TIBCO\TDV Server <version>\bin. Note that reauthenticating to the TDV Studio is required after restarting the server.

Sample Restart Call

.\composite.bat monitor restart
Once you deploy the adapter, you can create a new data source in TDV Studio for RabbitMQ.

Create a RabbitMQ Data Source in TDV Studio

With the CData API Driver for Tibco DV, you can easily create a data source for RabbitMQ and introspect the data source to add resources to TDV.

Create the Data Source

  1. Right-click on the folder you wish to add the data source to and select New -> New Data Source
  2. Scroll until you find the adapter (e.g. RabbitMQ) and click Next
  3. Name the data source (e.g. CData RabbitMQ Source)
  4. Fill in the required connection properties
  5. About RabbitMQ Management HTTP API

    RabbitMQ is an open-source message broker that supports multiple messaging protocols. The RabbitMQ Management HTTP API provides HTTP-based access to management and monitoring data for a RabbitMQ server. The API exposes information about virtual hosts, exchanges, queues, bindings, connections, channels, consumers, users, permissions, policies, and cluster-wide statistics.

    The Management plugin must be enabled on the RabbitMQ server for the HTTP API to be available. By default, the management interface listens on port 15672.

    Using Basic Authentication

    RabbitMQ Management HTTP API uses HTTP Basic authentication. You must supply the username and password of a RabbitMQ management user.

    To enable access to the management API:

    1. Ensure the RabbitMQ Management plugin is enabled on your server (rabbitmq-plugins enable rabbitmq_management).
    2. Use an existing management user or create one with the appropriate management tag (management, policymaker, monitoring, or administrator).
    3. Note the full base URL of your RabbitMQ Management HTTP API (e.g., http://localhost:15672).

    After configuring your RabbitMQ server, set the following connection properties to connect:

    • AuthScheme: Set this to Basic.
    • URL: Set this to the base URL of your RabbitMQ Management HTTP API (e.g., http://localhost:15672).
    • User: Set this to your RabbitMQ management username (e.g., guest).
    • Password: Set this to your RabbitMQ management password.

    Example connection string:

    Profile=C:\profiles\RabbitMQ.apip;AuthScheme=Basic;URL=http://localhost:15672;User=guest;Password=guest;
    

    Available Tables

    The RabbitMQ profile provides access to the following tables:

    • Overview - Cluster-wide statistics and information about the RabbitMQ node
    • Nodes - Information about individual nodes in the RabbitMQ cluster
    • NodeMemory - Detailed memory usage breakdown for a specific cluster node
    • Connections - List of all open AMQP connections to the broker
    • Channels - List of all open AMQP channels across all connections
    • Consumers - List of all consumers registered across all queues
    • Exchanges - List of exchanges declared across all virtual hosts
    • Queues - List of queues declared across all virtual hosts
    • Bindings - List of all bindings between exchanges and queues
    • VirtualHosts - List of virtual hosts configured on the broker
    • VhostPermissions - User permissions within a specific virtual host
    • Users - List of all RabbitMQ users
    • Permissions - Permission records for all users across all virtual hosts
    • TopicPermissions - Topic-level permission records for all users
    • Policies - List of policies applied to queues and exchanges in virtual hosts
    • OperatorPolicies - List of operator policies applied to queues in virtual hosts
    • Parameters - List of component parameters (e.g., federation, shovel) per virtual host
    • GlobalParameters - List of global parameters that apply across all virtual hosts
    • VhostLimits - Resource limits configured for specific virtual hosts
    • UserLimits - Resource limits configured for specific users
    • FeatureFlags - List of feature flags and their enabled/disabled state on the node
    • DeprecatedFeatures - List of deprecated features and their usage state
    • AuthAttempts - Authentication attempt statistics for the node
    • ClusterName - The name of the RabbitMQ cluster
    • WhoAmI - Information about the currently authenticated management user
    • ExchangeBindingsSource - Bindings for which a specific exchange is the source
    • ExchangeBindingsDestination - Bindings for which a specific exchange is the destination
    • QueueBindings - Bindings for a specific queue within a virtual host
  6. Click Create & Close.

Introspect the Data Source

Once the data source is created, you can introspect the data source by right-clicking and selecting Open. In the dashboard, click Add/Remove Resources and select the Tables, Views, and Stored Procedures to include as part of the data source. Click Next and Finish to add the selected RabbitMQ tables, views, and stored procedures as resources.

After creating and introspecting the data source, you are ready to work with RabbitMQ data in TIBCO Data Virtualization just like you would any other relational data source. You can create views, query using SQL, publish the data source, and more.

Ready to get started?

Learn more:

TIBCO DV Adapters