0.1.23 • Published 6 years ago

dispatch-management v0.1.23

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
6 years ago

dispatch-management

Wrapper for connecting to and managing a qpid dispatch router.

  • Correlates response messages with the calling function.
  • Sets up sender and a dynamic receiver to $management.
  • Provides a promise interface as well as a callback interface.
  • Provides ability to periodically poll and notifications
  • Provides ability to make management method calls UPDATE/ADD/DELETE

This library uses the rhea javascript client library.

npm install dispatch-management --save

Start a dispatch router with an http listener on port 5673

router {
    mode: standalone
    id: QDR
}
listener {
    port: 5673
    host: 0.0.0.0
    http: true
    role: normal
    saslMechanisms: ANONYMOUS
}

in your index.html:

<script src="node_modules/dispatch-management/dist/dispatch-management.min.js" type="text/javascript"></script>

in a .js file:

var dm = require("dispatch-management")
var management = new dm.Management('http')  //  use http (or https)

var connectOptions = {
    address: '0.0.0.0', 
    port: 5673, 
    reconnect: true, 
    properties: {client_id: 'my app connection properties'},  // optional
    hostname: 'my.domain.com'                                 // optional
}
// example of promise interface usage
management.connection.connect(connectOptions)
  .then(function (response) {
    console.log("connected to dispatch network on 0.0.0.0:5673")
    // example of callback interface
    management.getSchema(function (schema) {
      if (!schema.error)
        console.log("got schema")
      else
        console.log("unable to get schema")
    })
  }, function (error) {
    console.log("unable to connect" + error.msg)      
  })
0.1.23

6 years ago

0.1.22

6 years ago

0.1.21

6 years ago

0.1.20

6 years ago

0.1.19

6 years ago

0.1.17

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago