Giter Club home page Giter Club logo

react-native-rabbitmq's People

Contributors

gianfrancofois avatar timhonders avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-rabbitmq's Issues

'RMQClient/RMQClient.h' file not found

"react": "16.8.3",
"react-native": "0.59.9",
"react-native-rabbitmq": "^0.6.3",

pod 'RMQClient', '~> 0.11.0-rc1'

add $(SRCROOT)/Pods and react-native link
but it also has this error

No visible @interface for 'RMQConnection' declares the selector

package.json
...
"dependencies": {
"@react-native-mapbox-gl/maps": "^7.0.10",
"lz-string": "^1.4.4",
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-easy-toast": "^1.2.0",
"react-native-rabbitmq": "^0.6.7"
},
...

npm install react-native-rabbitmq --save
cd ./ios
change in the Podfile line 1: platform :ios, '9.0' to platform :ios, '10.0'
pod install

then I opened Xcode and build project was failed, errors:
No visible @interface for 'RMQConnection' declares the selector 'initWithUri:channelMax:frameMax:heartbeat:connectTimeout:readTimeout:writeTimeout:syncTimeout:delegate:delegateQueue:'

what should I do ?

image

Exchange message receive

I wanted to know how I received messages about certain routes via the "Exchange".
Anybody here have any idea how I can do it?

Publisher Confirms ?

Cannot get confirmation when I tried to publish data (RabbitMq receiving message). How we can get approve of our publishing? Thanks

Too many connection in IOS

At the time of that, when the application closes or is in the background, connections are generated that are not eliminated.
Many connections and channels are created for each connected device.

I'm not able to send message to the default exchange

Hi,
I'm trying to send a message to the lic_requests queue of the default exchange of my RabbitMQ server, my code implementations is as below:

import React, { Component } from 'react';

import { Text, TextInput, View, Button, Alert } from 'react-native';
import DeviceInfo from 'react-native-device-info';
// import { Connection, Exchange, Queue } from 'react-native-amqp';
import { Connection, Exchange, Queue } from 'react-native-rabbitmq';
const config = {
  host: 'localhost',
  port: 5672,
  username: 'mq-pub',   //your rabbitmq management username
  password: 'mq-pub',   //your rabbitmq management password
  virtualhost: '/'
};
class App extends Component {
  constructor() {
    super();
    this.state = {
      customerName: '',
      macAddress: '',
      showName: false,
      uniqueId: ''
    };
    this.getUniqueMacId()
  }
  getUniqueMacId() {
    const uniqueId = DeviceInfo.getUniqueId();
    DeviceInfo.getMacAddress().then((mac) => {
      this.setState({ macAddress: mac, uniqueId: uniqueId })
    });
  }
  displayNameHandler = (e) => {
    let updatedName = e.target.value;
    this.setState({ customerName: updatedName });
  }
  handleSubmit = () => {
    this.setState({
      showName: true
    });
    this.connectionEstablished();
  }
  connectionEstablished = () => {
    let connection = new Connection(config)
    console.log("print", config);
    connection.connect()
    connection.on('error', event => {
      connected = false;
      console.log("you are not connected");
    });
    connection.on('connected', (event) => {
      let queue = new Queue(connection, {
        name: this.state.uniqueId,
        passive: false,
        durable: false,
        exclusive: false,
        consumer_arguments: { 'x-priority': 1 }
      });
      let exchange = new Exchange(connection, {
        name: ''
      });
      queue.bind(exchange, this.state.uniqueId);
      exchange.publish('Hello', 'lic_requests', {});
      queue.on('message', (data) => {
        console.log("Message: ", data);
      });
    });
  }
  render() {
    return (
      <View>
        <View style={{ padding: 70, paddingTop: 200 }}>
          <TextInput
            style={{ height: 40 }}
            placeholder="Enter Your Customer Name"
            value={this.state.customerName}
            onChangeText={(text) => this.setState({ customerName: text })}
          />
        </View>
        <View style={{
          padding: 50
        }}>
          <Button
            title="Press me"
            onPress={() => { this.handleSubmit() }}
            disabled={this.state.customerName == "" ? true : false}
          />
        </View>
        <View>
          <Text style={{ paddingLeft: 50 }}>
            Devide Unique Id : {this.state.uniqueId}
          </Text>
          <Text style={{ paddingLeft: 50 }}>
            Device mac Address : {this.state.macAddress}
          </Text>
          {this.state.showName &&
            <Text style={{ paddingLeft: 50 }}>
              Customer Name : {this.state.customerName}
            </Text>}
        </View>
      </View>
    );
  }
}
export default App;

When I run the above code I don't see any messages in the lic_requests queue, please help me

On ios getting connected and then error

let connection = new Connection(config)
connection.connect()
let queue;
let exchange;
connection.on('connected', (event) => {
console.log("connected")
queue = new Queue(connection, {
name: ${userId},
passive: false,
durable: true,
exclusive: false,
consumer_arguments: {'x-priority': 1}
},{"x-queue-mode" : "lazy"});

    exchange = new Exchange(connection, {
      name: 'spmq_1001_durable',
      type: 'topic',
      durable: true,
      autoDelete: false,
      internal: false
  });     

keys.forEach( key=> { queue.bind(exchange, ${key}); })
queue.on('message', (data) => {

   queue.basicAck(data.delivery_tag)
  
    });
    
  });

  connection.on('error', event => {
    console.tron.log("you are not connected");
  });
}

This code is working on android but on ios its call giving connected first and then {"code": "5", "description": "Cannot use channel after it has been closed.", "name": "error", "type": "channel"}

Not apply argument Queue consume in iOS

in iOS argument like this:
this.queue = new Queue(this.connection, { name: 'test-' + DeviceInfo.getUniqueID(), passive: false, durable: false, exclusive: false, autoDelete: true, consumer_arguments: { 'x-priority': 1,'ackMode' : false, 'auto_delete': true, 'exclusive': false} });
not apply this configuration, only x-priority with -5456546 example.

undefined is not an object (evaluating 'this.rabbitmqconnection.initialize')

Hi, I am facing this issue while trying out the example in react native

TypeError: undefined is not an object (evaluating 'this.rabbitmqconnection.initialize')

This error is located at:
in App (at registerRootComponent.js:35)
in RootErrorBoundary (at registerRootComponent.js:34)
in ExpoRootComponent (at renderApplication.js:33)
in RCTView (at View.js:60)
in View (at AppContainer.js:102)
in RCTView (at View.js:60)
in View (at AppContainer.js:122)
in AppContainer (at renderApplication.js:32)

ios Queues only Exclusive

In the Queues are always created in exclusive mode.
In Android this does not happen, that is, it takes well the value of the configuration

Each connection is only able to receive a single message

Using sample code for receiving messages:

connection.on('connected', (event) => {

    let queue = new Queue( this.connection, {
        name: 'queue_name',
        passive: false,
        durable: true,
        exclusive: false,
        consumer_arguments: {'x-priority': 1}
    });

    let exchange = new Exchange(connection, {
        name: 'exchange_name',
        type: 'direct',
        durable: true,
        autoDelete: false,
        internal: false
    });

    queue.bind(exchange, 'queue_name');

    // Receive one message when it arrives
    queue.on('message', (data) => {
        console.warn(data);
    });
});

When connection is established, it receives only the first message from RabbitMQ and then nothing more happens! It seems that handleDelivery method of RabbitMqConsumer class in java side in only called once and I could not figure out the reason.

"react-native": "^0.55.4",
"react-native-rabbitmq": "^0.6.3",

How to set connection timeout?

Is there a way to set a timeout to the connect() method?

I've seen the default timeout is 60 seconds, but I would like to have a shorter interval, i.e 10 seconds, and if no connection then get the connected.on('error') callback.

Thanks!

Module 'JKVValue' not found

I created new project on RN 0.63.2. Then followed instructions and installed react-native-rabbitmq.

yarn add react-native-rabbitmq
cd ios
pod install
cd ..
yarn ios

And then i got error

CompileC /Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/Objects-normal/x86_64/RMQValues.o /Users/mikhailpopov/rabbitmqapp/ios/Pods/RMQClient/RMQClient/RMQValues.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RMQClient' from project 'Pods')
    cd /Users/mikhailpopov/rabbitmqapp/ios/Pods
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios8.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -fmodules-cache-path=/Users/mikhailpopov/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/mikhailpopov/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.4.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Index/DataStore -iquote /Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/RMQClient-generated-files.hmap -I/Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/RMQClient-own-target-headers.hmap -I/Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/RMQClient-all-non-framework-target-headers.hmap -ivfsoverlay /Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/all-product-headers.yaml -iquote /Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/RMQClient-project-headers.hmap -I/Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Products/Debug-iphonesimulator/RMQClient/include -I/Users/mikhailpopov/rabbitmqapp/ios/Pods/Headers/Private -I/Users/mikhailpopov/rabbitmqapp/ios/Pods/Headers/Private/RMQClient -I/Users/mikhailpopov/rabbitmqapp/ios/Pods/Headers/Public -I/Users/mikhailpopov/rabbitmqapp/ios/Pods/Headers/Public/CocoaAsyncSocket -I/Users/mikhailpopov/rabbitmqapp/ios/Pods/Headers/Public/JKVValue -I/Users/mikhailpopov/rabbitmqapp/ios/Pods/Headers/Public/RMQClient -I/Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/DerivedSources-normal/x86_64 -I/Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/DerivedSources/x86_64 -I/Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/DerivedSources -F/Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Products/Debug-iphonesimulator/RMQClient -include /Users/mikhailpopov/rabbitmqapp/ios/Pods/Target\ Support\ Files/RMQClient/RMQClient-prefix.pch -MMD -MT dependencies -MF /Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/Objects-normal/x86_64/RMQValues.d --serialize-diagnostics /Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/Objects-normal/x86_64/RMQValues.dia -c /Users/mikhailpopov/rabbitmqapp/ios/Pods/RMQClient/RMQClient/RMQValues.m -o /Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/Objects-normal/x86_64/RMQValues.o
In file included from /Users/mikhailpopov/rabbitmqapp/ios/Pods/RMQClient/RMQClient/RMQValues.m:52:
/Users/mikhailpopov/rabbitmqapp/ios/Pods/RMQClient/RMQClient/RMQValues.h:53:9: fatal error: module 'JKVValue' not found
@import JKVValue;
 ~~~~~~~^~~~~~~~
1 error generated.

warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'react-native-rabbitmq' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'JKVValue' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 5.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'CocoaAsyncSocket' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported deployment target versions is 8.0 to 13.4.99. (in target 'OpenSSL-Universal' from project 'Pods')
warning: no rule to process file '/Users/mikhailpopov/rabbitmqapp/ios/Pods/Flipper-RSocket/rsocket/benchmarks/CMakeLists.txt' of type 'text' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '/Users/mikhailpopov/rabbitmqapp/ios/Pods/Flipper-RSocket/rsocket/benchmarks/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')
warning: no rule to process file '/Users/mikhailpopov/rabbitmqapp/ios/Pods/Flipper-RSocket/rsocket/README.md' of type 'net.daringfireball.markdown' for architecture 'x86_64' (in target 'Flipper-RSocket' from project 'Pods')

** BUILD FAILED **


The following build commands failed:
        CompileC /Users/mikhailpopov/Library/Developer/Xcode/DerivedData/rabbitmqapp-concamnrjcysmbaeczdpdaawoiiu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RMQClient.build/Objects-normal/x86_64/RMQValues.o /Users/mikhailpopov/rabbitmqapp/ios/Pods/RMQClient/RMQClient/RMQValues.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Same error if i try to run project in Xcode
Снимок экрана 2020-08-03 в 20 09 41

This is my pod file

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'rabbitmqapp' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'rabbitmqappTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

target 'rabbitmqapp-tvOS' do
  # Pods for rabbitmqapp-tvOS

  target 'rabbitmqapp-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end

My package.json

{
  "name": "rabbitmqapp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "react": "16.13.1",
    "react-native": "0.63.2",
    "react-native-rabbitmq": "^0.6.7"
  },
  "devDependencies": {
    "@babel/core": "^7.11.0",
    "@babel/runtime": "^7.11.0",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.2.2",
    "eslint": "^7.6.0",
    "jest": "^26.2.2",
    "metro-react-native-babel-preset": "^0.61.0",
    "react-test-renderer": "16.13.1"
  },
  "jest": {
    "preset": "react-native"
  }
}

Can you help me with it? What i did wrong?

Can't connect to rabbit mq server

First of all I think const is misspelled as cont in the README and system_exchange should be exchange

Having changed these, when I try to connect to rabbit mq server using the config properties, I get :
Connection {rabbitmqconnection: Object, callbacks: Object, connected: false} as the connection object where connection = : let connection = new Connection(config);

I have referred https://www.rabbitmq.com/tutorials/tutorial-one-javascript.html to create rabbit mq server on node side

I am sure of the config properties because using same I can connect to rabbit mq from a separate node server. Tried to add loggers in both connection.on('error') & in connection.on('connected') but did not get any log

Unable to understand where the issue is.

Please help

Unbind with routing key not working in Android

When you try to unbind a queue with a routing key, it doesn't use the passed parameter, only unbinds the last binded routing key.

When you do:

queue.bind(exchange, "my.routing.key");
queue.bind(exchange, "other.routing.key");

And later:

queue.unbind(exchange, "my.routing.key");

It unbinds "other.routing.key"

iOS integration issue

After pod install getting 'React/RCTBridgeModule.h' file not found in RabbitMQDelegateLogger.h.

Pod file -

target 'SurveyModule' do
use_frameworks!
pod 'react-native-rabbitmq', :path => '../node_modules/react-native-rabbitmq'
pod 'RMQClient', :git => 'https://github.com/rabbitmq/rabbitmq-objc-client.git'
target 'SurveyModuleTests' do
inherit! :search_paths
# Pods for testing
end
end

message expiration not work

import {
Connection,
Queue,
Exchange
} from 'react-native-rabbitmq';

let connection:Connection=null;
let queue:Queue;
let exchange:Exchange;
let mExchangeName="weixinFace";
let mCallFun=null;//回调函数

export function setCallFun(callFun) {
mCallFun=callFun;
}
export function connectRabbitMq(channel) {
const config = {
host: 'xxxxxx',
port: 5672,
username: 'xxxx', //your rabbitmq management username
password: 'xxxx', //your rabbitmq management password
virtualhost: '/',
};

connection = new Connection(config);
connection.connect();
let connected = false;

connection.on('connected', (event) => {
    console.log("connected");
    queue = new Queue(connection, {
        name: channel,
        passive: false,
        durable: true,
        exclusive: false,
        // consumer_arguments: { 'x-message-ttl': 1000 },
        // Arguments:{'x-message-ttl': 1000 },
        // ttl:1000,
        autoDelete: false,
    });
    exchange = new Exchange(connection, {
        name: mExchangeName,
        type: 'direct',
        durable:true,
        autoDelete: false,
        internal: false,
    });
    queue.bind(exchange, channel);
    queue.on('message', (data) => {
        console.log(data);
        if(mCallFun)mCallFun(data);
    });
});
connection.on('error', event => {
    connected = false;
    console.log(connection);
    console.log(event);
    console.log("you are not connected");
});

}
export function closeRabbitMq() {
// connection.close();
}
export function sendMessage(message,channel) {
let properties ={expiration:1000};
exchange.publish(message,channel,properties);
}

queue ttl and exchange properties expiration not work ,please help me

Usage example

Please include usage example, it will be really helpful!

Podfile Problem

For the project to work and I can compile correctly the structure of the podfile you have to see the following:

platform :ios, '10.0'

target 'IterwayTracking' do
inhibit_all_warnings!
use_frameworks!

pod 'RMQClient', :git => 'https://github.com/rabbitmq/rabbitmq-objc-client.git'

end

With this other way I can not make it work properly:
https://github.com/transistorsoft/rn-background-geolocation-demo/blob/master/ios/Podfile
(Example podFile other Project)

In the documentation of native react generally use this
target 'xxxxx' do

   rn_path = '../node_modules/react-native'

   pod 'yoga', path: "# {rn_path} /ReactCommon/yoga/yoga.podspec"

   pod 'React', path: rn_path, subspecs: [
     'Core',
     'CxxBridge',
     'DevSupport',
     'RCTActionSheet',
     'RCTAnimation',
     'RCTGeolocation',
     'RCTImage',
     'RCTLinkingIOS',
     'RCTNetwork',
     'RCTSettings',
     'RCTText',
     'RCTVibration',
     'RCTWebSocket',
   ]

   # React Native third party dependencies podspecs
   pod 'DoubleConversion',: podspec => "# {rn_path} /third-party-podspecs/DoubleConversion.podspec"
   pod 'glog',: podspec => "# {rn_path} /third-party-podspecs/glog.podspec"
   pod 'Folly',: podspec => "# {rn_path} /third-party-podspecs/Folly.podspec"

ios怎么关闭恢复channel

我这里有个switch开关,关闭后会调用connection.close断开和消息服务器的链接,但每次打开都会恢复之前关闭的channel,也就是channel数量一直会增加,在android端可以通过this.factory.setAutomaticRecoveryEnabled和this.factory.setTopologyRecoveryEnabled设置为false解决,但ios端没有相关配置,设置最大channel数也解决不了

Messages are missing sometimes

I am pushing messages periodically from server and some of the messages seem missing and in android log I get the following error for the missed messages

Calling JS function after bridge has been destroyed:

Change Readme for iOS install

new version rabbit AMQP for ObjectC
https://github.com/rabbitmq/rabbitmq-objc-client.git
now It is not necessary change this fixes:
@import JKVValue;
to
#import "JKVValue.h"

#import <JKVValue/JKVValueImpl.h>
#import <JKVValue/JKVMutableValue.h>
#import <JKVValue/JKVObjectPrinter.h>
#import <JKVValue/JKVFactory.h>
to

#import "JKVValueImpl.h"
#import "JKVMutableValue.h"
#import "JKVObjectPrinter.h"
#import "JKVFactory.h"

@import CocoaAsyncSocket;
to
#import "GCDAsyncSocket.h"

queue.on Receives the message only one

“ react”:“ 16.8.3”,
“ react-native”:“ 0.59.8”,
“ react-native-rabbitmq”:“ ^ 0.6.3”

export function rabbitMqPublish(message) {
exchange.publish(message,queueId,{aa:11});
}
export function initRabbitMq() {
connection.connect();
connection.on('error',(event)=>{
connected=false;
console.log("connected fail");
});
connection.on('connected',(event)=>{
connected=true;
console.log("connected success");
queue=new Queue(connection,{
name:queueId,
durable:false,
autoDelete:false,
exclusive:false,
consumer_arguments:{'x-priority':1}
});
exchange = new Exchange(connection, {
name: exchange_name,
type: 'fanout',
durable: false,
autoDelete: false,
exclusive: false,
internal: false,
confirm: true
});
queue.bind(exchange, queueId);

    queue.on('message', (data) => {
        console.log('message', data);
    });
    queue.on('messages', (data) => {
        console.log('messages', data);
        //store.dispatch(actions.rabbitMessages(data));
    });
})

}
rabbitMqPublish publish a message ,queue.on Receives the message only one,After unable to receive messages

Bind to exchange without configure permissions on the server

I'm having difficulties creating a queue/exchange/bind in that I do not want the client to have the capabilities of configuring the exchange. Following the documentation, I'm getting an error of ACCESS_REFUSED - access to exchange refused unless I grant config permissions to the user account on the server, which I do not want to do.

Therefore, is it possible to use new Exchange() in a way that just asserts the exchange but doesn't attempt to create or change the config of it if it already exists on the server so that it can be bound to the queue for read/write? In other words, could queue.bind() be used with an exchange that is already configured on the server and not requiring new Exchange()?

Android assemble release failed

Hi,

I am getting error while build android application with release mode.

RN version: 0.63.4

Error:
Task :react-native-rabbitmq:verifyReleaseResources FAILED

  • What went wrong:
    Execution failed for task ':react-native-rabbitmq:verifyReleaseResources'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed

Please help me solve this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.