Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On ios getting connected and then error #27

Open
willson-spark-rex opened this issue Feb 5, 2020 · 5 comments
Open

On ios getting connected and then error #27

willson-spark-rex opened this issue Feb 5, 2020 · 5 comments

Comments

@willson-spark-rex
Copy link

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"}

@Ro392
Copy link

Ro392 commented Feb 10, 2020

I have the same problem. I reported it over a month ago but I didn't receive any solution. I see that the problem occurs when the queue has some arguments set for example: x-message-ttl, x-queue-mode, x-expires....
When the queue in rabbitmq does not exist then it is trying to create queue with this arguments. Just like in the picture. But when you open the queue Features is gone.
Another problem is the value of the argument because I set 'x-message-ttl': 86400000 but in cloudamqp I can see x-message-ttl: 11776

Zrzut ekranu 2020-02-10 o 15 15 17

Zrzut ekranu 2020-02-10 o 15 16 37

@mrozkosz
Copy link

Do you have any solution? I have the same problem and my application does not work because There is some Bug. Is there author od this? Can you solve this issue?

@timhonders
Copy link
Contributor

I am very busy at the moment, when i have time i wil check this problem.

@mrozkosz What is youre problem exactly

@Wilson-Lim
Copy link

I am having this error , can any1 help ?

Screenshot 2020-03-07 at 1 13 05 AM

@mrozkosz
Copy link

My clear project | ISSUE ONLY ON IOS

I'm trying connect to exist Queue with arguments. Without this arguments It works
Zrzut ekranu 2020-03-14 o 16 12 30
CODE

Zrzut ekranu 2020-03-14 o 16 20 24

Zrzut ekranu 2020-03-14 o 16 25 29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants