Giter Club home page Giter Club logo

stackstorm-rabbitmq's Introduction

RabbitMQ Integration Pack

Pack which allows integration with RabbitMQ.

Configuration

Configuration is required to use the RabbitMQ sensor. Copy the example configuration in rabbitmq.yaml.example to /opt/stackstorm/configs/rabbitmq.yaml and edit as required.

  • host - RabbitMQ host to connect to.
  • username - Username to connect to RabbitMQ (optional).
  • password - Password to connect to RabbitMQ (optional).
  • queues - List of queues to check for messages. See an example below.
  • quorum_queues - List of queues defined in queues that should be handled as type: quorum
  • deserialization_method - Which method to use to de-serialize the message body. By default, no deserialization method is specified which means the message body is left as it is. Valid values are json and pickle.

You can also use dynamic values from the datastore. See the docs for more info.

You can specify multiple queues using this syntax:

sensor_config:
  rabbitmq_queue_sensor:
    queues:
      - queue1
      - queue2
      - ....
    quorum_queues:
      - queue2

Actions

  • list_exchanges - List available exchanges.
  • list_queues - List available queues.
  • publish_message - Publish a message to a RabbitMQ service.

Note: list_exchanges and list_queues invoke rabbitmqadmin tool and must run on the same node where RabbitMQ server is running (they connect to the local instance).

publish_message example

The following action will publish a message to a remote RabbitMQ server with a stunnel-based tunnel preconfigured:

$ st2 run rabbitmq.publish_message host=localhost port=5673 virtual_host=sensu exchange=metrics exchange_type=topic username=sensu password=password message="foo.bar.baz 1 1436802746"

Sensors

  • new_message - Sensor that triggers a rabbitmq.new_message with a payload containing the queue and the body

This sensor should only be used with fanout and topic exchanges, this way it doesn't affect the behavior of the app since messages will still be delivered to other consumers / subscribers. If it's used with direct or headers exchanges, those messages won't be delivered to other consumers so it will affect app behavior and potentially break it.

stackstorm-rabbitmq's People

Contributors

arm4b avatar armab avatar blag avatar cognifloyd avatar emedvedev avatar enykeev avatar ip-sf avatar itxaka avatar jtopjian avatar kami avatar lindsayhill avatar manasdk avatar nmaludy avatar stnley avatar tienthanh2509 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.