How to use smqp - 3 common examples

To help you get started, we’ve selected a few smqp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paed01 / bpmn-elements / src / activity / Activity.js View on Github external
function popFormattingStart(routingKey) {
      for (let i = 0; i < pendingFormats.length; i++) {
        const pendingFormat = pendingFormats[i];
        if (getRoutingKeyPattern(pendingFormat.content.endRoutingKey).test(routingKey)) {
          logger.debug(`<${id}> completed formatting ${fields.routingKey} message content with formatter ${routingKey}`);
          pendingFormats.splice(i, 1);
          pendingFormat.ack();
          break;
        }
      }
    }
  }
github paed01 / bpmn-engine / index.js View on Github external
let environment = elements.Environment(options);
  const emitter = new EventEmitter();

  const engine = Object.assign(emitter, {
    execute,
    logger,
    getDefinitionById,
    getDefinitions,
    getState,
    recover,
    resume,
    stop,
    waitFor,
  });

  const broker = Broker(engine);
  broker.assertExchange('event', 'topic', {autoDelete: false});

  Object.defineProperty(engine, 'broker', {
    enumerable: true,
    get() {
      return broker;
    }
  });

  Object.defineProperty(engine, 'name', {
    enumerable: true,
    get() {
      return name;
    },
    set(value) {
      name = value;
github paed01 / bpmn-elements / src / EventBroker.js View on Github external
function EventBroker(brokerOwner, options, onBrokerReturn) {
  const broker = Broker(brokerOwner);
  const pfx = options.prefix;

  broker.assertExchange('event', 'topic', options);
  broker.on('return', onBrokerReturn || onBrokerReturnFn);

  return {
    eventPrefix: pfx,
    broker,
    on,
    once,
    waitFor,
    emit,
    emitFatal,
  };

  function on(eventName, callback, eventOptions = { once: false }) {

smqp

Synchronous message queueing package

MIT
Latest version published 8 days ago

Package Health Score

65 / 100
Full package analysis