npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cordova-plugin-amqp-advanced

v1.0.6

Published

Cordova Push Advanced Notification AMQP plugin

Readme

Cordova AMQP Plugin

Overview

This plugin provides a messaging notification system using an AMQP broker for both Android and iOS platforms. It allows devices to receive messages from a broker using a unique identifier, ensuring reliable message delivery even when the network connection is lost.

This plugin is an updated and improved version of cordova-plugin-amqp, originally developed 10 years ago.

Features

Connects to an AMQP broker to send and receive messages.

Automatically restarts the listener when the network becomes available.

Ensures messages are retained in the queue until they are processed.

Supports SSL and non-SSL connections but recommendation is to stay only on ssl.

Sends notifications with JSON content.

Works seamlessly with Cordova applications.

Installation

To install this plugin, use:

From GitHub:
cordova plugin add

OR

From NPM:
cordova plugin add cordova-plugin-amqp-advanced (NPM)

document.addEventListener('deviceready', function () { var config = { host: "app.domain.com", port: "5671", // 5671 for SSL, 5672 for non-SSL username: "myUsername", password: "myPassword", virtualHost: "/", queueName: "your-queue-name", routingKey: "some-routing-key" };

var myListener = function (event, data) {
  try {
      if (typeof data === "string" && data.startsWith("{") && data.endsWith("}")) {
          var jsonData = JSON.parse(data);
          console.log("Received JSON:", jsonData);
          alert("JSON Status: " + JSON.stringify(jsonData));
      } else {
          console.log("Received string:", data);
          alert("Message: " + data);
      }
  } catch (e) {
      console.error("Error processing message:", e, data);
      alert("Invalid message format: " + data);
  }
};

push.register(myListener, config);

}); Configuration Object { "host": "app.domain.com", "port": "5671", "virtualHost": "/", "username": "myUsername", "password": "myPassword", "queueName": "your-queue-name", "routingKey": "some-routing-key" } Plugin API register(listener, configuration, onConnectionLostCallback, successAppCallback, errorAppCallback) Registers the plugin and connects to the AMQP broker.

Parameters:

listener: Function to handle incoming messages.

configuration: JSON object containing broker settings.

onConnectionLostCallback: Optional callback when the connection is lost.

successAppCallback: Optional success callback.

errorAppCallback: Optional error callback.

createTemporaryQueue(successCallback, errorCallback) Creates a temporary queue for receiving messages.

Parameters:

successCallback(queueName): Callback function that returns the created queue name.

errorCallback(error): Callback function for error handling.

deleteTemporaryQueue(queueName, successCallback, errorCallback) Deletes a specified temporary queue.

Parameters:

queueName: Name of the queue to be deleted.

successCallback(): Callback function for successful deletion.

errorCallback(error): Callback function for error handling.

Handling Connection Loss If the connection to the broker is lost, the listener will attempt to reconnect automatically:

var notification = { onConnectionLost: function () { console.log("Connection lost. Attempting to reconnect..."); setTimeout(() => { push.register(myListener, config, onConnectionLost); }, 5000); // Retry after 5 seconds } };

License This project is licensed under the MIT License.

IMPORTANT: This is an little advanced / updated version of: https://github.com/etouraille/cordova-plugin-amqp (11years old now in 2025)