Skip to content

BUG: The "default-exchange" example exits with error #244

@mortezae

Description

@mortezae

I'm new in AMQP and playing with examples to learn. I'm running Rascal examples using cloudamqp free tier.

Description

file:///rabbitmq/rascal/examples/default-exchange/index.js:17
    .on('error', console.error);
    ^

TypeError: Cannot read properties of undefined (reading 'on')
    at file:///rabbitmq/rascal/examples/default-exchange/index.js:17:5
    at Immediate.<anonymous> (/rabbitmq/node_modules/rascal/lib/amqp/Broker.js:63:9)
    at process.processImmediate (node:internal/timers:485:21)

Expected Behavior

Actual Behavior

Possible Fix

Steps to Reproduce

Copied examples directory, regulated it for my instance, installed latest version and ran it.
This is config.json:

{
  "$schema": "../../lib/config/schema.json",
  "vhosts": {
    "/": {
      "connection": {
        "url": "amqps://me:asillypassword@coral.rmq3.cloudamqp.com/myvhost",
        "socketOptions": {
          "timeout": 1000
        }
      },
      "exchanges": [""],
      "queues": ["demo_q"],
      "publications": {
        "demo_pub": {
          "exchange": ""
        }
      },
      "subscriptions": {
        "demo_sub": {
          "queue": "demo_q"
        }
      }
    }
  }
}

Context

Your Environment

  • Version used:
    node.js v22.15.1 on Arch Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions