0.2.2 • Published 2 years ago

rn-tiny-rbmq v0.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

rn-tiny-rbmq

Tiny react native library only for basicConsume functional from RabbitMQ.

Installation

npm install rn-tiny-rbmq
npx pod-install

Change some lines of code to make the library work:

// Pods/RMQClient/RMQValues.h
// line 54 
// @import JKVValue;
#import "JKVValue.h"


// Pods/RMQClient/RMQTCPSocketTransport.h
// line 56
// @import CocoaAsyncSocket;
#import "GCDAsyncSocket.h"


// Pods/RMQClient/RMQTCPSocketConfigurator.h
// line 55
// @import CocoaAsyncSocket;
#import "GCDAsyncSocket.h"

Usage

import RnTinyRbmq from "rn-tiny-rbmq";

// ...

const config = {
    host: '',
    port: 5672,
    virtualhost: '',
    username: '',
    password: '',
    ttl: 10000,
    ssl: false,
};

const rbmq = new RnTinyRbmq(config);
rmmq.connect();

rbmq.on('connected', (event) => {
    rbmq.basicConsume('queue_name');
});
rbmq.on('error', (event) => {
    // ...
});
rbmq.on('message', (data) => {
    // ...
});

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

0.2.1

2 years ago

0.2.0

2 years ago

0.2.2

2 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago