https://github.com/mbejda/angular-topic-queue
Angular queue with topic routing and message acknowledgement
https://github.com/mbejda/angular-topic-queue
Last synced: about 1 year ago
JSON representation
Angular queue with topic routing and message acknowledgement
- Host: GitHub
- URL: https://github.com/mbejda/angular-topic-queue
- Owner: mbejda
- Created: 2015-10-01T14:17:18.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-10-02T16:45:47.000Z (almost 11 years ago)
- Last Synced: 2025-06-16T14:17:30.609Z (about 1 year ago)
- Language: JavaScript
- Homepage: http://ngmodules.org/modules/angular-topic-queue
- Size: 121 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular Queue with topic routing and acknowledgement
## Installation
Bower
`bower install angluar-topic-queue --save`
Add `ngTopicQueue` to your Angular app.
```
angular
.module('app', [
'ngAnimate',
'ngCookies',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'ngTopicQueue'
])
```
Load the `$topicQueue` in your controller.
```
angular.module('app')
.controller('MainCtrl', function ($topicQueue) {
/// code
})
```
## Example Usage
Routing to specific topic queues.
```
$topicQueue.topic('cat').addQueue(function(item){
console.log('cat ',arguments)
var self = this;
self.ack();
});
$topicQueue.topic('cat').addItem('cat','cat');
```
Routing to String only queues.
```
$topicQueue.topic('[a-z]').addQueue(function(item){
var self = this;
self.ack();
});
$topicQueue.topic('string').addItem('testing','testing');
```
Routing to Number only queues.
```
$topicQueue.topic('[0-9]').addQueue(function(item){
var self = this;
self.ack();
});
$topicQueue.topic(3).addItem('5','5');
```
### If you find a problem please open a issue or tweet at me.
Milos Bejda
http://twitter.com/notmilobejda
http://mbejda.com